projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7739f3
)
Do not read out of array bounds.
author
Ramiro Polla
<ramiro.polla@gmail.com>
Sun, 4 May 2008 01:07:46 +0000
(
01:07
+0000)
committer
Ramiro Polla
<ramiro.polla@gmail.com>
Sun, 4 May 2008 01:07:46 +0000
(
01:07
+0000)
Originally committed as revision 13053 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/flac.c
patch
|
blob
|
blame
|
history
diff --git
a/libavcodec/flac.c
b/libavcodec/flac.c
index
d2cc383
..
2e8e99b
100644
(file)
--- a/
libavcodec/flac.c
+++ b/
libavcodec/flac.c
@@
-279,9
+279,13
@@
static int decode_subframe_fixed(FLACContext *s, int channel, int pred_order)
if (decode_residuals(s, channel, pred_order) < 0)
return -1;
+ if(pred_order > 0)
a = decoded[pred_order-1];
+ if(pred_order > 1)
b = a - decoded[pred_order-2];
+ if(pred_order > 2)
c = b - decoded[pred_order-2] + decoded[pred_order-3];
+ if(pred_order > 3)
d = c - decoded[pred_order-2] + 2*decoded[pred_order-3] - decoded[pred_order-4];
switch(pred_order)