mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
avformat/nutdec: Check X in 2nd branch of index reading
Prevents read of uninitialized variable Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f275f9eaee
commit
ebb0ca3d70
@ -720,6 +720,10 @@ static int find_and_decode_index(NUTContext *nut)
|
|||||||
has_keyframe[n++] = flag;
|
has_keyframe[n++] = flag;
|
||||||
has_keyframe[n++] = !flag;
|
has_keyframe[n++] = !flag;
|
||||||
} else {
|
} else {
|
||||||
|
if (x <= 1) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "index: x %"PRIu64" is invalid\n", x);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
while (x != 1) {
|
while (x != 1) {
|
||||||
if (n >= syncpoint_count + 1) {
|
if (n >= syncpoint_count + 1) {
|
||||||
av_log(s, AV_LOG_ERROR, "index overflow B\n");
|
av_log(s, AV_LOG_ERROR, "index overflow B\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user