Commit 544880e
Cap VLA length in RichString wide-character functions
Limit the variable-length array size in RichString_writeFromWide()
and RichString_appendnWideColumns() to prevent stack exhaustion from
processes with extremely long command lines (up to ARG_MAX ~2MB).
Closes: GHSA-mjc3-mc44-c23f
Reported-by: Michał Majchrowicz (AFINE Team)
Reported-by: Marcin Wyczechowski (AFINE Team)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b7f9df9 commit 544880e
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
0 commit comments