Commit f2d9680
Fix integer overflow in composition time calculation
Use checked_add() instead of unchecked addition when calculating
start_composition and end_composition times. Malformed MP4 files
could trigger integer overflow, causing a panic in debug builds.
The fix returns None when overflow is detected, allowing the error
to propagate gracefully rather than crashing.
Fixes Mozilla bug 2014838.1 parent 8422a9d commit f2d9680
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
244 | 259 | | |
245 | 260 | | |
246 | 261 | | |
| |||
0 commit comments