diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c index 4afef2b00a..b59c3614e1 100644 --- a/libavformat/imf_cpl.c +++ b/libavformat/imf_cpl.c @@ -190,6 +190,10 @@ static int fill_content_title(xmlNodePtr cpl_element, FFIMFCPL *cpl) cpl->content_title_utf8 = xmlNodeListGetString(cpl_element->doc, element->xmlChildrenNode, 1); + if (!cpl->content_title_utf8) + cpl->content_title_utf8 = xmlStrdup(""); + if (!cpl->content_title_utf8) + return AVERROR(ENOMEM); return 0; }