summaryrefslogtreecommitdiff
path: root/libavformat/imf_cpl.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-07-23 23:30:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-07-25 23:17:29 +0200
commitac3e6b74bdd6959ce4411e78161b2f06d0926c43 (patch)
treea5d6ba561cbca516bbb446129cc83ee0b67c3d39 /libavformat/imf_cpl.c
parent509ce40f188734ec74078ebdd8d71f80116d9eaf (diff)
avformat/imf_cpl: Replace NULL content_title_utf8 by ""
Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com> Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/imf_cpl.c')
-rw-r--r--libavformat/imf_cpl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 69155d786d..5f1a67443f 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -182,6 +182,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;
}