Commit f51c132
committed
TSRM: roll back id_count when the resource type table cannot grow
ts_allocate_id(), ts_allocate_fast_id_at() and ts_allocate_tls_id()
increment id_count before growing resource_types_table. When the
realloc fails they return 0 with id_count still counting the new slot,
so allocate_new_resource() later walks j < id_count and reads an entry
that was never initialized. Roll id_count back on those three paths.1 parent 1d004f0 commit f51c132
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| 424 | + | |
422 | 425 | | |
423 | 426 | | |
424 | 427 | | |
| |||
0 commit comments