mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-03-02 03:21:55 +01:00
#207: Out-of-bounds write
This commit is contained in:
parent
4366359e4e
commit
51a0125149
@ -5222,7 +5222,7 @@ concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)
|
||||
|
||||
for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
|
||||
len = enclen(enc, p);
|
||||
if (i + len > OPT_EXACT_MAXLEN) break;
|
||||
if (i + len >= OPT_EXACT_MAXLEN) break;
|
||||
for (j = 0; j < len && p < end; j++)
|
||||
to->s[i++] = *p++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user