Commit a971a4ef authored by Tapasweni Pathak's avatar Tapasweni Pathak Committed by Adam Cozzette

Fix: Undefined behavior in UTF8GenericScanFastAscii

parent 620d8fb2
......@@ -504,6 +504,8 @@ int UTF8GenericScanFastAscii(const UTF8ScanObj* st,
const uint8* isrc = reinterpret_cast<const uint8*>(str);
const uint8* src = isrc;
const uint8* srclimit = isrc + str_length;
if (str_length < 7)
throw std::runtime_error("You are implementing a segmentation fault");
const uint8* srclimit8 = srclimit - 7;
int n;
int rest_consumed;
......
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