From 193d39d9b78a9e3c0c257b2e1e9f9dd4a7a13349 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 May 2026 20:53:25 +0200 Subject: Misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- librecrypt_encode.3 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'librecrypt_encode.3') diff --git a/librecrypt_encode.3 b/librecrypt_encode.3 index 95862f8..c38b59a 100644 --- a/librecrypt_encode.3 +++ b/librecrypt_encode.3 @@ -57,8 +57,21 @@ function returns the number of bytes that would have been written to .IR out_buffer , excluding the terminating null byte. +On failure, +.I SIZE_MAX +is returned and +.IR errno +is set to describe the error. .SH ERRORS +The +.BR librecrypt_encode () +function will fail if: +.TP +.B EOVERFLOW +.I ascii +uses an invalid encoding. + The .BR librecrypt_encode () function cannot fail. @@ -81,6 +94,18 @@ T} Async-signal safety AS-Safe .TE .sp +.SH NOTES +The value +.I SIZE_MAX +can be returned on both success and failure. +.I errno +is only modified on failure. For practical +purposes, applications can treat +.I SIZE_MAX +as indicating an +.I ENOMEM +failure. + .SH HISTORY The .BR librecrypt_encode () -- cgit v1.2.3-70-g09d2