-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit 67b74b2
exif/heic: Avoid overflow when adding box size and checking against file size
We change the order of operations such that the file size check cannot
overflow in the for loop. This prevents infinite loops.
We also add an overflow check at the end of the loop body to prevent the
addition of offset and box.size from overflowing.1 parent 389691a commit 67b74b2
1 file changed
+4
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4388 | 4388 |
| |
4389 | 4389 |
| |
4390 | 4390 |
| |
4391 | - | ||
4391 | + | ||
4392 | 4392 |
| |
4393 | 4393 |
| |
4394 | 4394 |
| |
| |||
4425 | 4425 |
| |
4426 | 4426 |
| |
4427 | 4427 |
| |
4428 | + | ||
4429 | + | ||
4430 | + | ||
4428 | 4431 |
| |
4429 | 4432 |
| |
4430 | 4433 |
| |
|
0 commit comments