From d9eb5f7fde528923d96b413007af78395405a2bc Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 21 Apr 2014 13:44:15 +0100 Subject: [PATCH] matroska: fix content encoding scope validity check It's 3 bits, and http://matroska.org/technical/specs/index.html says it can't be 0. Coverity 1139660 --- gst/matroska/matroska-read-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c index fd10924ba4..da7072071e 100644 --- a/gst/matroska/matroska-read-common.c +++ b/gst/matroska/matroska-read-common.c @@ -2664,7 +2664,7 @@ gst_matroska_read_common_read_track_encoding (GstMatroskaReadCommon * common, if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) break; - if (num > 7 && num == 0) { + if (num > 7 || num == 0) { GST_ERROR_OBJECT (common, "Invalid ContentEncodingScope %" G_GUINT64_FORMAT, num); ret = GST_FLOW_ERROR;