Commit 47c4db6
authored
fix: dangling stack pointer segfault in upgrade for revisioned packages (#104)
When a formula has revision > 0, prepareOne() formatted the version
string into a stack-local buffer. That pointer was returned in
PrepareResult.success.version, but the stack frame was destroyed
when prepareOne returned — leaving the swap phase reading dead memory.
Allocate from the arena instead, which outlives the swap phase.1 parent 8f6d481 commit 47c4db6
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | 71 | | |
73 | | - | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
0 commit comments