Commit 79c76c97 authored by ramiro's avatar ramiro

Do not read out of array bounds.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13053 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6e78d041
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment