Commit cc3e5dd
authored
fix: prevent uint32_t overflow in avifSetTileConfiguration tile area
When computing the tile count, width * height was performed as a
uint32_t multiplication. For images with dimensions whose product
exceeds UINT32_MAX (e.g. 100000x50000), this silently wraps around,
producing an incorrect tile count and potentially corrupt tile layout.
Fix by widening to uint64_t before multiplying.
Fixes: integer overflow in avifSetTileConfiguration (src/write.c)
Co-authored-by: uwezkhan06 <uwezkhan055@gmail.com>1 parent d236952 commit cc3e5dd
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
0 commit comments