# HG changeset patch # User vitor # Date 1266082978 0 # Node ID e8461dae9672deac2a925f4a1d95fa0f2dc9356f # Parent 8805efb4c3fdb061d8846735e2fab51ec92ef0ed Fix reading beyond buffer end on RA144Context.lpc_tables. Patch by Francesco Lavra (francescolavra -at- interfree -dot- it) diff -r 8805efb4c3fd -r e8461dae9672 ra144.c --- a/ra144.c Sat Feb 13 15:57:49 2010 +0000 +++ b/ra144.c Sat Feb 13 17:42:58 2010 +0000 @@ -219,7 +219,7 @@ { int i; - for (i=0; i < 30; i++) + for (i=0; i < 10; i++) *out++ = *inp++; } @@ -276,7 +276,7 @@ // Interpolate block coefficients from the this frame's forth block and // last frame's forth block. - for (i=0; i<30; i++) + for (i=0; i<10; i++) out[i] = (a * ractx->lpc_coef[0][i] + b * ractx->lpc_coef[1][i])>> 2; if (eval_refl(work, out, ractx->avctx)) { @@ -297,7 +297,7 @@ int buf_size = avpkt->size; static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; unsigned int refl_rms[4]; // RMS of the reflection coefficients - uint16_t block_coefs[4][30]; // LPC coefficients of each sub-block + uint16_t block_coefs[4][10]; // LPC coefficients of each sub-block unsigned int lpc_refl[10]; // LPC reflection coefficients of the frame int i, j; int16_t *data = vdata;