aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-04-22 13:14:26 +0200
committerPaul B Mahol <onemda@gmail.com>2018-12-19 10:23:55 +0100
commit7c000b9cead009634bc219d84a81d9117ff34db4 (patch)
treeb3e8d40466f77e88ea4885ac0839c4e56c297669 /libavformat
parente44498984d3d1b52640c597d88d534b07d2e7881 (diff)
downloadffmpeg-7c000b9cead009634bc219d84a81d9117ff34db4.tar.gz
avformat/dsfdec: fix calculation of size of data chunk
Ignore extra 12 bytes that belong to tag and size. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dsfdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index e0485f1492..5e06fd63a5 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -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;