mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 00:04:06 -09:00
package/libxml2: fix segfault with python-lxml
Backport a patch fixing a segfault first introduced by
ca63c4409b in buildroot.
Fixes:
==4792== Invalid read of size 8
==4792== at 0x4FE7661: __gconv_close (gconv_close.c:33)
==4792== by 0x4FE70EE: iconv_close (iconv_close.c:34)
==4792== by 0x5AED422: xmlCharEncCloseFunc (encoding.c:2678)
==4792== by 0x587A78C: __pyx_f_4lxml_5etree__find_PyUCS4EncodingName (etree.c:126676)
==4792== by 0x5888666: __pyx_pymod_exec_etree (etree.c:289773)
==4792== by 0x4A06345: PyModule_ExecDef (moduleobject.c:440)
==4792== by 0x4AE23A8: _imp_exec_dynamic_impl (import.c:3801)
==4792== by 0x4AE23A8: _imp_exec_dynamic (import.c.h:534)
==4792== by 0x4A046A3: cfunction_vectorcall_O (methodobject.c:509)
==4792== by 0x4AAA203: _PyEval_EvalFrameDefault (bytecodes.c:3263)
==4792== by 0x49B9D2B: _PyObject_VectorcallTstate (pycore_call.h:92)
==4792== by 0x49B9D2B: object_vacall (call.c:850)
==4792== by 0x49B9F44: PyObject_CallMethodObjArgs (call.c:911)
==4792== by 0x4AE648A: import_find_and_load (import.c:2781)
==4792== by 0x4AE648A: PyImport_ImportModuleLevelObject (import.c:2864)
==4792== Address 0x8 is not stack'd, malloc'd or (recently) free'd
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
30b05ce90d
commit
e2e152496a
31
package/libxml2/0002-Fix-Fix-compilation-with-uclibc.patch
Normal file
31
package/libxml2/0002-Fix-Fix-compilation-with-uclibc.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 539663626b91567159a70791c0f2b3b167135e9b Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Thu, 16 Jan 2025 15:50:46 +0100
|
||||
Subject: [PATCH] Fix "Fix compilation with uclibc"
|
||||
|
||||
The ICU code must initialize the iconv members as well.
|
||||
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/commit/539663626b91567159a70791c0f2b3b167135e9b
|
||||
---
|
||||
encoding.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/encoding.c b/encoding.c
|
||||
index 41ecde18..0ce8d479 100644
|
||||
--- a/encoding.c
|
||||
+++ b/encoding.c
|
||||
@@ -1641,6 +1641,10 @@ xmlCreateUconvHandler(const char *name, xmlCharEncodingHandler **out) {
|
||||
}
|
||||
enc->input = NULL;
|
||||
enc->output = NULL;
|
||||
+#ifdef LIBXML_ICONV_ENABLED
|
||||
+ enc->iconv_in = (iconv_t) -1;
|
||||
+ enc->iconv_out = (iconv_t) -1;
|
||||
+#endif
|
||||
enc->uconv_in = ucv_in;
|
||||
enc->uconv_out = ucv_out;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user