[vlc-commits] xmlent: check for NULL in test harness
Rémi Denis-Courmont
git at videolan.org
Sun Feb 26 13:57:40 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 26 14:57:11 2017 +0200| [65187c07290a6e4bc49d84654376058ab51e9134] | committer: Rémi Denis-Courmont
xmlent: check for NULL in test harness
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=65187c07290a6e4bc49d84654376058ab51e9134
---
src/test/xmlent.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/test/xmlent.c b/src/test/xmlent.c
index d5caaf0..46c04bb 100644
--- a/src/test/xmlent.c
+++ b/src/test/xmlent.c
@@ -51,6 +51,12 @@ static void encode (const char *in, const char *out)
printf ("\"%s\" -> \"%s\" ?\n", in, out);
buf = vlc_xml_encode (in);
+ if (buf == NULL)
+ {
+ puts(" ERROR: got NULL");
+ exit(2);
+ }
+
if (strcmp (buf, out))
{
printf (" ERROR: got \"%s\"\n", buf);
More information about the vlc-commits
mailing list