changeset 4226:43ebe9279fa0 libavcodec

fix some potential security issues, patch by Matthias Hopf, mat at mshopf dot de
author bcoudurier
date Wed, 22 Nov 2006 01:11:29 +0000
parents fad0e092cb68
children ef1d382309e5
files alac.c shorten.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/alac.c	Tue Nov 21 21:18:55 2006 +0000
+++ b/alac.c	Wed Nov 22 01:11:29 2006 +0000
@@ -472,7 +472,10 @@
                 ALAC_EXTRADATA_SIZE);
             return input_buffer_size;
         }
-        alac_set_info(alac);
+        if (alac_set_info(alac)) {
+            av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
+            return input_buffer_size;
+        }
         alac->context_initialized = 1;
     }
 
--- a/shorten.c	Tue Nov 21 21:18:55 2006 +0000
+++ b/shorten.c	Wed Nov 22 01:11:29 2006 +0000
@@ -335,7 +335,8 @@
         }
         s->nwrap = FFMAX(NWRAP, maxnlpc);
 
-        allocate_buffers(s);
+        if (allocate_buffers(s))
+            return -1;
 
         init_offset(s);