From: Edward Hervey Date: Tue, 2 Jan 2018 14:23:00 +0000 (+0100) Subject: nalutils: Fix Exponential-Golomb 'ue' parsing X-Git-Tag: 1.19.3~507^2~4583 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ecb3dc91794984723b90cb29b4732aa671dd848;p=platform%2Fupstream%2Fgstreamer.git nalutils: Fix Exponential-Golomb 'ue' parsing The algorithm we use only supports up to a maximum exponent of 31 (for a maximum resulting of 2**32 -1) CID #1427097 --- diff --git a/gst-libs/gst/codecparsers/nalutils.c b/gst-libs/gst/codecparsers/nalutils.c index d73e26e..6f9bc3a 100644 --- a/gst-libs/gst/codecparsers/nalutils.c +++ b/gst-libs/gst/codecparsers/nalutils.c @@ -219,7 +219,7 @@ nal_reader_get_ue (NalReader * nr, guint32 * val) return FALSE; } - if (G_UNLIKELY (i > 32)) + if (G_UNLIKELY (i > 31)) return FALSE; if (G_UNLIKELY (!nal_reader_get_bits_uint32 (nr, &value, i)))