diff --git a/jsonpull.c b/jsonpull.c index e44cf2b..ff80ce4 100644 --- a/jsonpull.c +++ b/jsonpull.c @@ -310,6 +310,10 @@ again: } c = peek(f); + if (c < '0' || c > '9') { + *error = "Exponent without digits"; + return NULL; + } while (c >= '0' && c <= '9') { string_append(&val, getc(f)); c = peek(f);