changeset 3158:5b2a0e54dfa7 libavcodec

fix infinite loop
author michael
date Thu, 02 Mar 2006 21:47:53 +0000
parents 58dc6ca8c92d
children e1157712c1d5
files qdm2.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/qdm2.c	Thu Mar 02 13:55:49 2006 +0000
+++ b/qdm2.c	Thu Mar 02 21:47:53 2006 +0000
@@ -2008,8 +2008,10 @@
 {
     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);