Fixes: signed integer overflow: 9079256848778919936 - -288230376151711746 cannot be represented in type 'long' Fixes: 58248/clusterfuzz-testcase-minimized-ffmpeg_dem_OGG_fuzzer-6326851353313280
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -196,7 +196,7 @@ static int theora_packet(AVFormatContext *s, int idx) · 195 unmodified lines | |||
| 196 | if(s->streams[idx]->start_time == AV_NOPTS_VALUE && os->lastpts != AV_NOPTS_VALUE) { | 196 | if(s->streams[idx]->start_time == AV_NOPTS_VALUE && os->lastpts != AV_NOPTS_VALUE) { |
| 197 | s->streams[idx]->start_time = os->lastpts; | 197 | s->streams[idx]->start_time = os->lastpts; |
| 198 | if (s->streams[idx]->duration > 0) | 198 | if (s->streams[idx]->duration > 0) |
| 199 | s->streams[idx]->duration -= s->streams[idx]->start_time; | 199 | s->streams[idx]->duration = av_sat_sub64(s->streams[idx]->duration, s->streams[idx]->start_time); |
| 200 | } | 200 | } |
| 201 | } | 201 | } |
| 202 | 202 | ||