Commit 50fb80cd authored by Tapasweni Pathak's avatar Tapasweni Pathak Committed by Adam Cozzette

fix check for undefined behavior

parent fbbbc45a
......@@ -395,7 +395,7 @@ int UTF8GenericScan(const UTF8ScanObj* st,
const uint8* isrc = reinterpret_cast<const uint8*>(str);
const uint8* src = isrc;
const uint8* srclimit = isrc + str_length;
const uint8* srclimit8 = srclimit - 7;
const uint8* srclimit8 = str_length < 7 ? isrc : srclimit - 7;
const uint8* Tbl_0 = &st->state_table[st->state0];
DoAgain:
......
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