From 9827e6e44652555992e168609abf94e4237ca944 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Sat, 20 Dec 2025 18:18:24 -0600 Subject: [PATCH] Note on xmlTextWriterWriteBase64 about no safety check --- xmlwriter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmlwriter.c b/xmlwriter.c index 55a70bf42..57772f03e 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -1552,6 +1552,11 @@ xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len, * @param start the position within the data of the first byte to encode * @param len the number of bytes to encode * @returns the bytes written (may be 0 because of buffering) or -1 in case of error + * + * NOTE: No safety check is done on the length of data. This check is + * something that should happen outside of this call, the caller + * should know better the actual data and if it's reaching the end + * of the buffer or not. */ int xmlTextWriterWriteBase64(xmlTextWriter *writer, const char *data,