mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Bug #20239] Fix overflow at down-casting
This commit is contained in:
parent
8bd83bb133
commit
75aaeb35b8
2 changed files with 2 additions and 2 deletions
|
@ -3521,7 +3521,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
|||
n = pend - pstart;
|
||||
DATA_ENSURE(n);
|
||||
sprev = s;
|
||||
STRING_CMP_IC(case_fold_flag, pstart, &s, (int)n, end);
|
||||
STRING_CMP_IC(case_fold_flag, pstart, &s, n, end);
|
||||
while (sprev + (len = enclen(encode, sprev, end)) < s)
|
||||
sprev += len;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue