mirror of
https://gitee.com/openharmony/third_party_libxml2
synced 2024-11-26 17:42:39 +00:00
6ed35a1d3e
Signed-off-by: @ran-zhao-yu <ranzhaoyu1@huawei.com>
30 lines
911 B
Diff
30 lines
911 B
Diff
From 48c13bd5203b325deb670d5b69015e9adc40990f Mon Sep 17 00:00:00 2001
|
|
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
|
Date: Sat, 29 Oct 2022 15:38:16 +0200
|
|
Subject: [PATCH 01/28] xinclude: Fix memory leak when fuzzing
|
|
|
|
This only affects the fuzzing build mode.
|
|
|
|
Reference: https://github.com/GNOME/libxml2/commit/075cee9e9f1bedb6b2ca87e73a952fb2e92da3c1
|
|
Conflict: xinclude.c:<xmlXIncludeDoProcess>
|
|
---
|
|
xinclude.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/xinclude.c b/xinclude.c
|
|
index 8c14a68..6ee58cb 100644
|
|
--- a/xinclude.c
|
|
+++ b/xinclude.c
|
|
@@ -2424,7 +2424,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree,
|
|
* of replacements.
|
|
*/
|
|
if (ctxt->incTotal >= 20)
|
|
- return(-1);
|
|
+ break;
|
|
#endif
|
|
ctxt->incTotal++;
|
|
xmlXIncludePreProcessNode(ctxt, cur);
|
|
--
|
|
2.27.0
|
|
|