Commit 9794ec1c authored by Rafaël Carré's avatar Rafaël Carré
Browse files

mp4a packetizer: fix buffer overflow

parent de537274
......@@ -804,8 +804,11 @@ static int LOASParse(decoder_t *p_dec, uint8_t *p_buffer, int i_buffer)
continue;
/* FIXME that's slow (and a bit ugly to write in place) */
for (int i = 0; i < pi_payload[i_program][i_layer]; i++)
for (int i = 0; i < pi_payload[i_program][i_layer]; i++) {
if (i_accumulated >= i_buffer)
return 0;
p_buffer[i_accumulated++] = bs_read(&s, 8);
}
}
}
} else {
......
Supports Markdown
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