summaryrefslogtreecommitdiff
path: root/libavcodec/flacdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-03-04 23:16:30 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-03-04 23:16:30 +0000
commit549bccdbe43b97f19d276078e6c742549d616aad (patch)
tree490a827416c1895ea52f3b269b14d782281f8f34 /libavcodec/flacdec.c
parenta3d2379bdd821eec60f20ee3945047d659894bda (diff)
flacdec: Handle 32 bps data when checking allocated size.
Originally committed as revision 17814 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r--libavcodec/flacdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 73e524a55d..ab2be93442 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -545,7 +545,7 @@ static int decode_frame(FLACContext *s, int alloc_data_size)
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)