AmendHub

Download:

jcs

/

wikipedia

/

amendments

/

9

pdjson: Enable max stack setting


jcs made amendment 9 about 1 year ago
--- pdjson.c Sun Aug 21 22:59:13 2022 +++ pdjson.c Tue Aug 23 14:02:07 2022 @@ -672,10 +672,11 @@ read_number(json_stream *json, short c) return JSON_ERROR; } } + if (pushchar(json, '\0') != 0) return JSON_ERROR; - else - return JSON_NUMBER; + + return JSON_NUMBER; } bool --- pdjson.h Sun Aug 21 22:16:04 2022 +++ pdjson.h Tue Aug 23 15:52:27 2022 @@ -31,6 +31,8 @@ #include <stdio.h> #include "util.h" +#define PDJSON_STACK_MAX 20 + enum json_type { JSON_ERROR = 1, JSON_DONE, JSON_OBJECT, JSON_OBJECT_END, JSON_ARRAY, JSON_ARRAY_END,