Skip to content

Commit

Permalink
fix: Issue 25893 in oss-fuzz: Stack-buffer-overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Sep 24, 2020
1 parent 48a40c7 commit a4aaa67
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/unicode.c
Expand Up @@ -431,13 +431,12 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,

for (i = 0; i < ncs[0]; i++) {
for (j = 0; j < ncs[1]; j++) {
if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1])
continue;
items[n].byte_len = lens[1];
items[n].code_len = 2;
items[n].code[0] = cs[0][i];
items[n].code[1] = cs[1][j];
if (items[n].code[0] == orig_codes[0] &&
items[n].code[1] == orig_codes[1])
continue;
n++;
}
}
Expand Down

0 comments on commit a4aaa67

Please sign in to comment.