changeset 819:ae89deb3a97d libavcodec

* avoid negative numbers as well
author kabi
date Thu, 31 Oct 2002 20:22:30 +0000
parents 15ec5cb57695
children 6d225a8f0ff0
files wmadec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/wmadec.c	Thu Oct 31 18:22:15 2002 +0000
+++ b/wmadec.c	Thu Oct 31 20:22:30 2002 +0000
@@ -1282,7 +1282,7 @@
         s->last_bitoffset = pos & 7;
         pos >>= 3;
         len = buf_size - pos;
-        if (len > MAX_CODED_SUPERFRAME_SIZE) {
+        if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) {
             return -1;
         }
         s->last_superframe_len = len;