Commit fe1e6b91 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ebb0ca3d)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8cfc0fdb
......@@ -679,6 +679,10 @@ static int find_and_decode_index(NUTContext *nut)
has_keyframe[n++] = flag;
has_keyframe[n++] = !flag;
} else {
if (x <= 1) {
av_log(s, AV_LOG_ERROR, "index: x %"PRIu64" is invalid\n", x);
goto fail;
}
while (x != 1) {
if (n >= syncpoint_count + 1) {
av_log(s, AV_LOG_ERROR, "index overflow B\n");
......
Markdown is supported
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