1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/ff_insert_pad: fix order of operations

Fixes out of bounds access
Fixes CID732170
Fixes CID732169

No filter is known to use this function in a way so the issue can be reproduced.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-21 16:21:14 +02:00
parent c655216939
commit ab2bfb85d4

View File

@ -119,8 +119,8 @@ int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
(*count)++;
for (i = idx + 1; i < *count; i++)
if (*links[i])
(*(unsigned *)((uint8_t *) *links[i] + padidx_off))++;
if ((*links)[i])
(*(unsigned *)((uint8_t *) (*links)[i] + padidx_off))++;
return 0;
}