diff options
author | wm4 <nfxjfg@googlemail.com> | 2013-08-11 17:40:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-11 21:46:09 +0200 |
commit | a5ef7960fc96ed773acc4149104d6acf534e8a87 (patch) | |
tree | 36438f0a4c5648fc11a87b26c20becc1432262d5 | |
parent | d404fe35b2fb918e38e58c2256a77b8113229951 (diff) | |
download | ffmpeg-a5ef7960fc96ed773acc4149104d6acf534e8a87.tar.gz |
ape: check avio_read() return value
This sets pkt->size to absurd values on failure otherwise.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/ape.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index e2b8adae86..bb61a2498d 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -414,6 +414,8 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) AV_WL32(pkt->data , nblocks); AV_WL32(pkt->data + 4, ape->frames[ape->currentframe].skip); ret = avio_read(s->pb, pkt->data + extra_size, ape->frames[ape->currentframe].size); + if (ret < 0) + return ret; pkt->pts = ape->frames[ape->currentframe].pts; pkt->stream_index = 0; |