From 74b02377980321934e33969c84733ace7e9f4eeb Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 13 Oct 2014 13:34:24 +0100 Subject: mov: Correctly check the color transfer characteristics range Reported-by: Ruoyu --- libavformat/mov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/mov.c b/libavformat/mov.c index 2b64cbf365..0e29bf3f23 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -923,7 +923,8 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) * 23001-8) so some adjusting is required */ if (color_primaries >= AVCOL_PRI_FILM) color_primaries = AVCOL_PRI_UNSPECIFIED; - if (color_trc >= AVCOL_TRC_LINEAR || color_trc <= AVCOL_TRC_LOG_SQRT || + if ((color_trc >= AVCOL_TRC_LINEAR && + color_trc <= AVCOL_TRC_LOG_SQRT) || color_trc >= AVCOL_TRC_BT2020_10) color_trc = AVCOL_TRC_UNSPECIFIED; if (color_matrix >= AVCOL_SPC_BT2020_NCL) -- cgit v1.2.3