History

avformat/oggparsetheora: clip duration within 64bit

Fixes: signed integer overflow: 9079256848778919936 - -288230376151711746 cannot be represented in type 'long' Fixes: 58248/clusterfuzz-testcase-minimized-ffmpeg_dem_OGG_fuzzer-6326851353313280

Michael Niedermayer committed 3 years ago

Commit b1c3d811 parent b168aeb1 file · +1 −1Browse files

Showing the changes to libavformat (1 of 1 file). Show all

Unified · Split

libavformat/oggparsetheora.c+1−1
@@ -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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t