From c9faa29259ac23b5fbf945f61056288e413dae81 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Thu, 2 Jan 2020 14:12:39 +0100
Subject: [PATCH] Fix overflow check in xmlNodeDump

Store return value of xmlBufNodeDump in a size_t before checking for
integer overflow.

Found by lgtm.com
---
 xmlsave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xmlsave.c b/xmlsave.c
index 7158c26..b06e24d 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -2187,7 +2187,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
             int format)
 {
     xmlBufPtr buffer;
-    int ret;
+    size_t ret;
 
     if ((buf == NULL) || (cur == NULL))
         return(-1);
-- 
1.8.3.1

