From 8800946aa3cb8835df4af6569e168ba57030133b Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 11 Jun 2012 10:49:15 +0100 Subject: [PATCH] h264parser: do not assert on data input, just return https://bugzilla.gnome.org/show_bug.cgi?id=674069 --- gst-libs/gst/codecparsers/gsth264parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c index 9dbfe46b98..2866e8ec7b 100644 --- a/gst-libs/gst/codecparsers/gsth264parser.c +++ b/gst-libs/gst/codecparsers/gsth264parser.c @@ -326,7 +326,8 @@ nal_reader_get_ue (NalReader * nr, guint32 * val) return FALSE; } - g_return_val_if_fail (i <= 32, FALSE); + if (G_UNLIKELY (i > 32)) + return FALSE; if (G_UNLIKELY (!nal_reader_get_bits_uint32 (nr, &value, i))) return FALSE;