From 2872ae21c344d83a2f4ce154da01baa892da59fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 23 Nov 2016 18:57:17 +0200 Subject: [PATCH] element: Don't increment NULL pointers Trivial workaround for coverity false warning. CID 1394488, 1394487. --- gst/gstelement.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/gstelement.c b/gst/gstelement.c index 7eea64d..4ff9c67 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1026,8 +1026,11 @@ gst_element_is_valid_request_template_name (const gchar * templ_name, g_free (target); } - templ_name++; - name++; + /* otherwise we increment these from NULL to 1 */ + if (next_specifier) { + templ_name++; + name++; + } } while (next_specifier); return TRUE; -- 2.7.4