aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_encode_base64.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-03-19 22:33:41 +0100
committerMattias Andrée <maandree@kth.se>2022-03-19 22:33:46 +0100
commitb5508dd1088acfc31a8a92fd9798fced0bcb41b3 (patch)
tree54bea20b98ed9848727230ff994e708e35e7a87d /libar2_encode_base64.3
parenttest: check libar2_decode_base64 with buffer overlap (diff)
downloadlibar2-b5508dd1088acfc31a8a92fd9798fced0bcb41b3.tar.gz
libar2-b5508dd1088acfc31a8a92fd9798fced0bcb41b3.tar.bz2
libar2-b5508dd1088acfc31a8a92fd9798fced0bcb41b3.tar.xz
libar2_encode_base64: fix support for overlap1.2.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2_encode_base64.3')
-rw-r--r--libar2_encode_base64.321
1 files changed, 21 insertions, 0 deletions
diff --git a/libar2_encode_base64.3 b/libar2_encode_base64.3
index 89abaa7..c40e002 100644
--- a/libar2_encode_base64.3
+++ b/libar2_encode_base64.3
@@ -7,6 +7,8 @@ libar2_encode_base64 - Encode data to base64
#include <libar2.h>
size_t libar2_encode_base64(char *\fIbuf\fP, const void *\fIdata\fP, size_t \fIlen\fP);
+
+#define libar2_encode_base64_overlap_support libar2_encode_base64
.fi
.PP
Link with
@@ -47,6 +49,25 @@ is 0 or if
is
.IR NULL .
+.PP
+In previous versions of libar2, the
+.BR libar2_encode_base64 (3)
+did not support overlap in the
+.I buf
+and
+.IR data ,
+this was a bug. The existence of the
+.B libar2_encode_base64_overlap_support
+macro indicates that this bug has been fixed.
+The
+.B libar2_encode_base64_overlap_support
+macro is defined as
+.I libar2_encode_base64
+so that it can be used in place of
+.BR libar2_encode_base64 ()
+if support of memory overlap is required; e.g.
+when encoding directly into the read buffer.
+
.SH RETURN VALUES
The
.BR libar2_encode_base64 ()