Unverified Commit a66faf8c authored by Ian Craggs's avatar Ian Craggs Committed by GitHub

Merge pull request #434 from hailinzeng/codereview

fix memory out of bound access and stack overflow in UTF8_validate
parents 7b906794 d462b877
......@@ -138,7 +138,7 @@ int UTF8_validate(int len, const char* data)
}
curdata = UTF8_char_validate(len, data);
while (curdata && (curdata < data + len))
curdata = UTF8_char_validate(len, curdata);
curdata = UTF8_char_validate(data + len - curdata, curdata);
rc = curdata != NULL;
exit:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment