This is an automated email from the ASF dual-hosted git repository.
scantor pushed a commit to branch xerces-3.2
in repository https://gitbox.apache.org/repos/asf/xerces-c.git
The following commit(s) were added to refs/heads/xerces-3.2 by this push:
new b403617d2 XERCESC-2214 - Wrong delete[] in MemBufInputSource dtor
b403617d2 is described below
commit b403617d281ae146dff3a62ea481753e32cf0def
Author: Scott Cantor <[email protected]>
AuthorDate: Wed Oct 5 16:40:38 2022 -0400
XERCESC-2214 - Wrong delete[] in MemBufInputSource dtor
https://issues.apache.org/jira/browse/XERCESC-2214
---
src/xercesc/framework/MemBufInputSource.hpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/xercesc/framework/MemBufInputSource.hpp
b/src/xercesc/framework/MemBufInputSource.hpp
index 9bc7b5ad6..a35132eda 100644
--- a/src/xercesc/framework/MemBufInputSource.hpp
+++ b/src/xercesc/framework/MemBufInputSource.hpp
@@ -48,9 +48,11 @@ class BinInputStream;
*
* The passed buffer can be adopted or merely referenced. If it is adopted,
* then it must be dynamically allocated and will be destroyed when the
- * input source is destroyed (no reference counting!.) If not adopted, the
- * caller must insure that it remains valid until the input source object
- * is destroyed.
+ * input source is destroyed (no reference counting!.) Note that the
+ * deallocation assumes that array deletion should be performed, so do
+ * not pass a non-array-allocated buffer if asking for adoption.
+ * If not adopted, the caller must insure that it remains valid until the
+ * input source object is destroyed.
*
* The other option indicates whether each stream created for this input
* source should get its own copy of the data, or whether it should just
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]