From 319ea0e7b510ac162a0e909e806b2a7be69ee25d 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 4a2ada6..c9eaea3 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; /* skip spaces */ -- 2.7.4