Skip to content
Snippets Groups Projects
Commit 39bec05e authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Reinhard Tartler
Browse files

qdm2: check array index before use, fix out of array accesses


Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>

(cherry picked from commit a7ee6281)

CC: libav-stable@libav.org

Signed-off-by: default avatarReinhard Tartler <siretart@tauware.de>
parent 1f8f43a5
No related branches found
No related tags found
No related merge requests found
...@@ -1232,6 +1232,11 @@ static void qdm2_decode_super_block (QDM2Context *q) ...@@ -1232,6 +1232,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
for (i = 0; packet_bytes > 0; i++) { for (i = 0; packet_bytes > 0; i++) {
int j; int j;
if (i >= FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
SAMPLES_NEEDED_2("too many packet bytes");
return;
}
q->sub_packet_list_A[i].next = NULL; q->sub_packet_list_A[i].next = NULL;
if (i > 0) { if (i > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment