json: Handle error cases while parsing numbers

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
This commit is contained in:
Arun Raghavan 2016-06-01 17:18:35 +05:30
parent 777a5091f6
commit 5b1bd84902
2 changed files with 30 additions and 1 deletions

View file

@ -223,6 +223,10 @@ START_TEST(bad_test) {
"123456789012345678901234567890" /* Overflow */,
"0.123456789012345678901234567890" /* Overflow */,
"1e123456789012345678901234567890" /* Overflow */,
"1e" /* Bad number string */,
"1." /* Bad number string */,
"1.e3" /* Bad number string */,
"-" /* Bad number string */,
};
for (i = 0; i < PA_ELEMENTSOF(bad_parse); i++) {