[libxml2] Don't call printf with NULL string in runtest.c
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Don't call printf with NULL string in runtest.c
- Date: Fri, 2 Aug 2019 11:34:25 +0000 (UTC)
commit 6c91dd94959c94ee139e870843f285fcb22fc55c
Author: Daniel Richard G <skunk iSKUNK ORG>
Date: Thu Aug 1 15:01:47 2019 +0200
Don't call printf with NULL string in runtest.c
Avoids undefined behavior causing problems on HP-UX and Solaris.
Closes #78.
runtest.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/runtest.c b/runtest.c
index b1c30d85..13e36a49 100644
--- a/runtest.c
+++ b/runtest.c
@@ -880,6 +880,8 @@ internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
callbacks++;
if (quiet)
return;
+ if (name == NULL)
+ name = BAD_CAST "(null)";
fprintf(SAXdebug, "SAX.internalSubset(%s,", name);
if (ExternalID == NULL)
fprintf(SAXdebug, " ,");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]