[libxml2/2.9] Fix potential double-free in xmlXPtrStringRangeFunction
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2/2.9] Fix potential double-free in xmlXPtrStringRangeFunction
- Date: Fri, 29 Apr 2022 16:00:22 +0000 (UTC)
commit 169f86b7fb8b2cbbc137225bc136e16ac2317b66
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sat Mar 5 18:25:16 2022 +0100
Fix potential double-free in xmlXPtrStringRangeFunction
Fix double-free in an unlikely error condition. Thanks to Wentao Liang
for the report.
Fixes #341.
xpointer.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/xpointer.c b/xpointer.c
index afeaa2ec..e9c783cd 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -2756,6 +2756,7 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
*/
tmp = xmlXPtrNewLocationSetNodeSet(set->nodesetval);
xmlXPathFreeObject(set);
+ set = NULL;
if (tmp == NULL) {
xmlXPathErr(ctxt, XPATH_MEMORY_ERROR);
goto error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]