]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsmsg xml parser: fix NULL oops, fixes #5135
authorJaroslav Kysela <perex@perex.cz>
Fri, 22 Jun 2018 08:26:22 +0000 (10:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 22 Jun 2018 08:26:22 +0000 (10:26 +0200)
src/htsmsg_xml.c

index 7a27b44bbb2acb552762c5f5c7f15d61d895278d..4123e74d65c54ee45fd65d954692539f73531a8b 100644 (file)
@@ -424,7 +424,7 @@ htsmsg_xml_parse_pi(xmlparser_t *xp, htsmsg_t *parent, char *src)
   while(1) {
     if(*src == 0) {
       xmlerr(xp, "Unexpected end of file during parsing of "
-            "Processing instructions");
+                "Processing instructions");
       return NULL;
     }
 
@@ -763,9 +763,7 @@ htsmsg_parse_prolog(xmlparser_t *xp, char *src)
   htsmsg_t *xmlpi;
   const char *encoding;
 
-  while(1) {
-    if(*src == 0)
-      break;
+  while(src != NULL && *src != 0) {
 
     while(is_xmlws(*src))
       src++;