• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From a3e11b385c04f2d0dc7d8c51635e5deb5b867261 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Sat, 25 Feb 2023 16:05:24 +0100
4Subject: [PATCH] malloc-fail: Fix memory leak in xmlXPathEqualNodeSetFloat
5
6Found with libFuzzer, see #344.
7
8Reference:https://github.com/GNOME/libxml2/commit/a3e11b385c04f2d0dc7d8c51635e5deb5b867261
9Conflict:NA
10---
11 xpath.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/xpath.c b/xpath.c
15index ef9f517..7f2c92a 100644
16--- a/xpath.c
17+++ b/xpath.c
18@@ -6814,8 +6814,8 @@ xmlXPathEqualNodeSetFloat(xmlXPathParserContextPtr ctxt,
19 		valuePush(ctxt, xmlXPathCacheNewString(ctxt->context, str2));
20 		xmlFree(str2);
21 		xmlXPathNumberFunction(ctxt, 1);
22-		val = valuePop(ctxt);
23                 CHECK_ERROR0;
24+		val = valuePop(ctxt);
25 		v = val->floatval;
26 		xmlXPathReleaseObject(ctxt->context, val);
27 		if (!xmlXPathIsNaN(v)) {
28--
292.27.0
30
31