changeset 1509:edc979a1ecb5 libavformat

check for frames with 2*size > max_dist and no crc
author michael
date Tue, 14 Nov 2006 22:24:10 +0000
parents 105e0c574359
children d68525fe36da
files nutdec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/nutdec.c	Tue Nov 14 22:23:26 2006 +0000
+++ b/nutdec.c	Tue Nov 14 22:24:10 2006 +0000
@@ -687,6 +687,9 @@
         get_v(bc);
     if(flags&FLAG_CHECKSUM){
         get_be32(bc); //FIXME check this
+    }else if(size > 2*nut->max_distance){
+        av_log(s, AV_LOG_ERROR, "frame size > 2max_distance and no checksum\n");
+        return -1;
     }
     *flags_ret= flags;