summaryrefslogtreecommitdiffstats
path: root/src/jsmn.h
AgeCommit message (Collapse)AuthorFilesLines
9 hoursjsmn: use size_t for token offsets and harden against overflowGravatar Nikias Bassen1-6/+12
Use size_t for token start/end offsets instead of int, replace the -1 sentinel with SIZE_MAX, and add a defensive guard against offset wraparound. This prevents overflow when parsing very large JSON inputs. This addresses issue #282. Credit to @ylwango613 for repporting.
2021-12-24json: Update parser (jsmn) to verify the length of the input dataGravatar Nikias Bassen1-1/+2
This way the string doesn't have to be 0-terminated.
2021-12-23Add support for JSON formatGravatar Nikias Bassen1-0/+91