Repository navigation
Commit 851c879
committed
Fix scan position truncation with fixed_anchor on 64-bit
adjust_registers_to_matched() narrowed 64-bit scan positions to int via
onig_region_set(), so pos > INT_MAX produced negative match registers and
getch/get_byte read out of bounds in fixed_anchor mode. Store the
positions directly in the region instead.1 parent a552ea6 commit 851c879
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| 1186 | + | |
1186 | 1187 | | |
1187 | | - | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1188 | 1192 | | |
1189 | 1193 | | |
1190 | | - | |
| 1194 | + | |
| 1195 | + | |
1191 | 1196 | | |
1192 | 1197 | | |
1193 | 1198 | | |
| |||
0 commit comments