subparse: fix svace issue (add null check)
authorEunhae Choi <eunhae1.choi@samsung.com>
Tue, 29 Nov 2016 04:45:26 +0000 (13:45 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Tue, 29 Nov 2016 04:45:26 +0000 (13:45 +0900)
Change-Id: Ie76839a33aa679514737c2e05475a1499d0fb74b

gst/subparse/samiparse.c

index 4a2ada6..c9eaea3 100644 (file)
@@ -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 */