Commit 4737b87
committed
Fix unsigned underflow in buffer_check_append_limits()
Same pattern as buffer_check_limits() fix: when buf->used exceeds
buf->writable_size, the unsigned subtraction wraps to a large value,
bypassing the bounds check and taking the fast path without
validation. Add used > writable_size guard before the subtraction.1 parent 1e0583b commit 4737b87
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
0 commit comments