Skip to content

Commit 53387aa

Browse files
committed
fixed #2480
1 parent 8f3088b commit 53387aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/utils/xml_parser.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static void xml_sax_parse_entity(GF_SAXParser *parser)
704704
}
705705
}
706706
if (ent_name) gf_free(ent_name);
707+
if (ent && !ent->value)
708+
parser->sax_state = SAX_STATE_SYNTAX_ERROR;
707709
xml_sax_store_text(parser, i);
708710
}
709711

@@ -968,7 +970,7 @@ static GF_Err xml_sax_parse(GF_SAXParser *parser, Bool force_parse)
968970
static GF_Err xml_sax_append_string(GF_SAXParser *parser, char *string)
969971
{
970972
u32 size = parser->line_size;
971-
u32 nl_size = (u32) strlen(string);
973+
u32 nl_size = string ? (u32) strlen(string) : 0;
972974

973975
if (!nl_size) return GF_OK;
974976

0 commit comments

Comments
 (0)