From c58fd80fcf44b2cb84b06629df8e0ae9e54ab786 Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Tue, 29 Nov 2016 13:45:26 +0900 Subject: [PATCH] subparse: fix svace issue (add null check) Change-Id: Ie76839a33aa679514737c2e05475a1499d0fb74b --- gst/subparse/samiparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c index ed86124..0d0efc1 100644 --- a/gst/subparse/samiparse.c +++ b/gst/subparse/samiparse.c @@ -566,6 +566,9 @@ html_context_handle_element (HtmlContext * ctxt, gchar *attr_name = NULL, *attr_value = NULL; next = (gchar*)strcasestr (next, "lang:"); + if (!next) + break; + attr_value = (gchar*)malloc (3); next = next + 5; strncpy (attr_value, next, 2); -- 2.7.4