Commit 729e5d0
Fix integer overflow in Gradient::populate()
A signed integer overflow vulnerability existed in `src/lottie/lottiemodel.cpp`
where the `colorPoints` value from untrusted JSON input (`g.p` field) could be
set to values >= 0x40000000, causing `colorPoints * 4` to overflow to 0.
This bypassed the bounds check and led to a heap buffer over-read
during gradient rendering.1 parent ffe6094 commit 729e5d0
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | 253 | | |
255 | | - | |
| 254 | + | |
256 | 255 | | |
257 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| |||
0 commit comments