summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-02 21:47:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-02 21:47:53 +0000
commitd00bff20b2b48796e4bd2d0b83819c159f60a25f (patch)
treec9bafbc253ffd694ea54ebe985621f71a23b0399
parent61452d5637bf422cd845eb5eb16b11a161831b73 (diff)
downloadffmpeg-streaming-d00bff20b2b48796e4bd2d0b83819c159f60a25f.zip
ffmpeg-streaming-d00bff20b2b48796e4bd2d0b83819c159f60a25f.tar.gz
fix infinite loop
Originally committed as revision 5102 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/qdm2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 98bec5c..3645f43 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -2008,8 +2008,10 @@ static int qdm2_decode_frame(AVCodecContext *avctx,
{
QDM2Context *s = avctx->priv_data;
- if((buf == NULL) || (buf_size < s->checksum_size))
+ if(!buf)
return 0;
+ if(buf_size < s->checksum_size)
+ return -1;
*data_size = s->channels * s->frame_size * sizeof(int16_t);
OpenPOWER on IntegriCloud