Commit c4d78bf
committed
Fix use-after-free register bug in do_get_tail
TailBytesReg0 is freed at line 3151 via {free, TailBytesReg0} in the
call_primitive for PRIM_TERM_SUB_BINARY_HEAP_SIZE. After that call,
the physical register is no longer preserved across subsequent calls
and may be reallocated.
Line 3163 was using TailBytesReg0 (the freed register) instead of
TailBytesReg1 (freshly loaded at line 3162 via get_array_element).
Both registers were potentially always the same or have the same
value across backends and this bug hasn't been observed.
Signed-off-by: Paul Guyot <pguyot@kallisys.net>1 parent c805acc commit c4d78bf
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3149 | 3149 | | |
3150 | 3150 | | |
3151 | 3151 | | |
3152 | | - | |
| 3152 | + | |
3153 | 3153 | | |
3154 | 3154 | | |
3155 | 3155 | | |
| |||
0 commit comments