Skip to content

Commit

Permalink
avformat/dsfdec: fix calculation of size of data chunk
Browse files Browse the repository at this point in the history
Ignore extra 12 bytes that belong to tag and size.

Signed-off-by: Paul B Mahol <[email protected]>
  • Loading branch information
richardpl authored and fritsch committed Dec 16, 2018
1 parent 715e0fc commit c602712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavformat/dsfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ static int dsf_read_header(AVFormatContext *s)
dsf->data_end = avio_tell(pb);
if (avio_rl32(pb) != MKTAG('d', 'a', 't', 'a'))
return AVERROR_INVALIDDATA;
dsf->data_size = avio_rl64(pb);
dsf->data_end += dsf->data_size;
dsf->data_size = avio_rl64(pb) - 12;
dsf->data_end += dsf->data_size + 12;
s->internal->data_offset = avio_tell(pb);

return 0;
Expand Down

0 comments on commit c602712

Please sign in to comment.