Commit a26ecba0 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '52a1c32c'

* commit '52a1c32c':
  nut: Use nut->version in the version range check

Conflicts:
	libavformat/nutdec.c

Note, this bug did not affect ffmpeg
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents eee6ad38 52a1c32c
......@@ -229,13 +229,13 @@ static int decode_main_header(NUTContext *nut)
end = get_packetheader(nut, bc, 1, MAIN_STARTCODE);
end += avio_tell(bc);
tmp = ffio_read_varlen(bc);
if (tmp < NUT_MIN_VERSION && tmp > NUT_MAX_VERSION) {
av_log(s, AV_LOG_ERROR, "Version %"PRId64" not supported.\n",
tmp);
nut->version = ffio_read_varlen(bc);
if (nut->version < NUT_MIN_VERSION &&
nut->version > NUT_MAX_VERSION) {
av_log(s, AV_LOG_ERROR, "Version %d not supported.\n",
nut->version);
return AVERROR(ENOSYS);
}
nut->version = tmp;
if (nut->version > 3)
nut->minor_version = ffio_read_varlen(bc);
......
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