summaryrefslogtreecommitdiffstats
path: root/src/jplist.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-12-24 02:49:56 +0100
committerGravatar Nikias Bassen2021-12-24 02:49:56 +0100
commita22f0f5dd020958c7a61282e067479add99a0a5a (patch)
tree7ea42064702a5826def5e3b584516922d168094e /src/jplist.c
parent914480a8771959bc2dc0f5e8e83365c15c05c36d (diff)
downloadlibplist-a22f0f5dd020958c7a61282e067479add99a0a5a.tar.gz
libplist-a22f0f5dd020958c7a61282e067479add99a0a5a.tar.bz2
json: Update parser (jsmn) to verify the length of the input data
This way the string doesn't have to be 0-terminated.
Diffstat (limited to 'src/jplist.c')
-rw-r--r--src/jplist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jplist.c b/src/jplist.c
index fbc963e..889ce30 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -661,7 +661,7 @@ PLIST_API int plist_from_json(const char *json, uint32_t length, plist_t * plist
}
tokens = newtokens;
- r = jsmn_parse(&parser, json, tokens, maxtoks);
+ r = jsmn_parse(&parser, json, length, tokens, maxtoks);
if (r == JSMN_ERROR_NOMEM) {
maxtoks+=16;
continue;