• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 74263eff5f6212afa2196022ecd2fbc39c6d3c36 Mon Sep 17 00:00:00 2001
2From: jinsub ahn <jinniahn@gmail.com>
3Date: Wed, 30 Mar 2022 06:02:31 +0000
4Subject: [PATCH 206/300] fix: xmlXPathParserContext could be double-delete in
5 OOM case.
6
7Reference:https://github.com/GNOME/libxml2/commit/74263eff5f6212afa2196022ecd2fbc39c6d3c36
8Conflict:NA
9---
10 xpath.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/xpath.c b/xpath.c
14index c2d8458..e79dcec 100644
15--- a/xpath.c
16+++ b/xpath.c
17@@ -13895,7 +13895,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool)
18 			 xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
19 	if (ctxt->valueTab == NULL) {
20 	    xmlXPathPErrMemory(ctxt, "creating evaluation context\n");
21-	    xmlFree(ctxt);
22+	    return(-1);
23 	}
24 	ctxt->valueNr = 0;
25 	ctxt->valueMax = 10;
26--
272.27.0
28
29
30