• Peter Hutterer's avatar
    util: tighten safe_atod parsing to only parse 'normal' numbers · 19ea63bf
    Peter Hutterer authored
    We don't have a sensible use case where we want hex to double, or INF to
    double, or any of that. So check the strings for invalid characters and bail
    out early. Invalid characters include 'e' and whitespaces too, we don't need
    those.
    
    Small chance of things breaking: if the user-exposed calibration matrix
    property was specified using hex numbers this will stop working now. I'll take
    that risk.
    Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    19ea63bf
test-misc.c 45.4 KB