* 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:
Michael Clark
2009-02-25 01:51:40 +00:00
parent e8de078806
commit 22dee7cb59
5 changed files with 8 additions and 5 deletions

View File

@@ -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;