changeset 9131:dfa6b3358c61 libavcodec

flacdec: Handle 32 bps data when checking allocated size.
author jbr
date Wed, 04 Mar 2009 23:16:30 +0000
parents 721e21aca252
children 37bb2785a35b
files flacdec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flacdec.c	Wed Mar 04 23:10:40 2009 +0000
+++ b/flacdec.c	Wed Mar 04 23:16:30 2009 +0000
@@ -545,7 +545,7 @@
         return -1;
     }
 
-    if (blocksize * s->channels * sizeof(int16_t) > alloc_data_size)
+    if (blocksize * s->channels * (s->is32 ? 4 : 2) > alloc_data_size)
         return -1;
 
     if (sample_rate_code == 0)