Commit d462b877 authored by hailinzeng's avatar hailinzeng

fix memory out of bound access and stack overflow in UTF8_validate

Signed-off-by: 's avatarhailinzeng <hailinzeng@gmail.com>
parent 10c895c5
......@@ -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