wiredtiger/wiredtiger.github.com — Issue #62: __process_value doesn't check for illegal numeric values
Author: wiredtiger
Created: 2012-01-31 16:00:44+00:00
State: open

The code in __process_value doesn't check for invalid numeric values. I missed a comma after a configuration string and ended up with something like:

key_format=u,leaf_node_max=4096debug_split_min,leaf_node_min=4096

in the config string, and it was silently accepted.

It also looks like __process_value doesn't check for any digits at all, that is, what if someone puts:

leaf_node_max=,leaf_node_min=4096

in a configuration string, will that be rejected? (A quick test makes me think it won't, is 0 our default in all cases?)

Note that endptr, as set by strtol() will be set to value->str if there are no digits in the string, which might screw up in the following switch statement, although I suppose 0 shifted by anything is always 0?