From 1400a301f5be433f5e44f2108939965449ccc39b Mon Sep 17 00:00:00 2001 From: dmex Date: Thu, 26 Dec 2024 01:57:57 +1100 Subject: [PATCH] Update json_tokener.c --- tools/thirdparty/jsonc/json_tokener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/thirdparty/jsonc/json_tokener.c b/tools/thirdparty/jsonc/json_tokener.c index ca5e7d3ea297..77e495f8f471 100644 --- a/tools/thirdparty/jsonc/json_tokener.c +++ b/tools/thirdparty/jsonc/json_tokener.c @@ -332,7 +332,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char * * If the function is called with len == -1 then strlen is called to check * the string length is less than INT32_MAX (2GB) */ - if ((len < -1) || (len == -1 && strlen(str) > INT32_MAX)) + if ((len == -1 && strlen(str) > INT32_MAX)) { tok->err = json_tokener_error_size; return NULL;