History

avformat/dhav: Don't truncate return value of avio_skip()

Fixes demuxing files bigger than INT_MAX.

Andreas Rheinhardt committed 4 years ago

Commit 34173791 parent 0a58fdf1 file · +3 −3Browse files

Unified · Split

libavformat/dhav.c+3−3
@@ -78,10 +78,11 @@ static const uint32_t sample_rates[] = { · 77 unmodified lines
78static int parse_ext(AVFormatContext *s, int length)78static int parse_ext(AVFormatContext *s, int length)
79{79{
80 DHAVContext *dhav = s->priv_data;80 DHAVContext *dhav = s->priv_data;
81 int index, ret = 0;81 int64_t ret = 0;
82 82
83 while (length > 0) {83 while (length > 0) {
84 int type = avio_r8(s->pb);84 int type = avio_r8(s->pb);
85 int index;
85 86
86 switch (type) {87 switch (type) {
87 case 0x80:88 case 0x80:
@@ -168,8 +169,7 @@ static int read_chunk(AVFormatContext *s) · 80 unmodified lines
168{169{
169 DHAVContext *dhav = s->priv_data;170 DHAVContext *dhav = s->priv_data;
170 int frame_length, ext_length;171 int frame_length, ext_length;
171 int64_t start, end;172 int64_t start, end, ret;
172 int ret;
173 173
174 if (avio_feof(s->pb))174 if (avio_feof(s->pb))
175 return AVERROR_EOF;175 return AVERROR_EOF;

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