Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r--libavformat/iff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index edf308b135..03c4b08762 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -462,6 +462,8 @@ static int iff_read_packet(AVFormatContext *s,
buf = pkt->data;
bytestream_put_be16(&buf, 2);
ret = avio_read(pb, buf, iff->body_size);
+ if (ret>=0 && ret < iff->body_size)
+ av_shrink_packet(pkt, ret + 2);
} else {
av_assert0(0);
}