This turns out to be because of a special input case in myatof3(),
wherein if the input length is 0, it call strlen to find the length.
The solution is to add a test and not call the function unless the
length is positive.
* NV. */
NV value;
+ SSize_t value_len = lookup_len - equals_pos;
/* Get the value */
- if (my_atof3(lookup_name + equals_pos, &value,
- lookup_len - equals_pos)
+ if ( value_len <= 0
+ || my_atof3(lookup_name + equals_pos, &value,
+ value_len)
!= lookup_name + lookup_len)
{
goto failed;