Commit a49df0c
Fix two bugs in regidx.c: OOB array access and double-free
1. regidx_overlap: cap iend to nidx-1 instead of nidx, preventing
an out-of-bounds read of list->idx[nidx] in the i<=iend loop.
2. regidx_init: set str.s = NULL after freeing it so the error
path does not double-free when hts_close() fails.1 parent ceab492 commit a49df0c
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
444 | | - | |
| 445 | + | |
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
| |||
0 commit comments