mirror of
https://github.com/json-c/json-c.git
synced 2026-04-08 23:09:07 +08:00
* Null pointer dereference fix. Fix json_object_get_boolean strlen test
to not return TRUE for zero length string. Remove redundant includes.
Erik Hovland, erik at hovland dot org
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@31 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
@@ -83,6 +83,9 @@ static void json_tokener_reset_level(struct json_tokener *tok, int depth)
|
||||
void json_tokener_reset(struct json_tokener *tok)
|
||||
{
|
||||
int i;
|
||||
if (!tok)
|
||||
return;
|
||||
|
||||
for(i = tok->depth; i >= 0; i--)
|
||||
json_tokener_reset_level(tok, i);
|
||||
tok->depth = 0;
|
||||
|
||||
Reference in New Issue
Block a user