aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2014-08-18 10:32:57 +0000
committerPaul B Mahol <onemda@gmail.com>2014-08-18 10:32:57 +0000
commit90b2f3136778311fb5e097b8ee1f527518231c23 (patch)
treee891c70496e19537f409212c1f2be5a85814865c /libavformat
parentca2160b5b3d9aec02d7c1d93e445b8cfb9c7716c (diff)
downloadffmpeg-90b2f3136778311fb5e097b8ee1f527518231c23.tar.gz
cafdec: check for eof in read_info_chunk()
Fixes Ticket #3864 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/cafdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index c797e20c09..e53102b368 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -205,7 +205,7 @@ static void read_info_chunk(AVFormatContext *s, int64_t size)
AVIOContext *pb = s->pb;
unsigned int i;
unsigned int nb_entries = avio_rb32(pb);
- for (i = 0; i < nb_entries; i++) {
+ for (i = 0; i < nb_entries && !avio_feof(pb); i++) {
char key[32];
char value[1024];
avio_get_str(pb, INT_MAX, key, sizeof(key));