28 lines
825 B
Diff
28 lines
825 B
Diff
From 2b0eb50e43667ce8cebf0bb745a0eb7d493385c2 Mon Sep 17 00:00:00 2001
|
|
From: Yann Ylavic <ylavic@apache.org>
|
|
Date: Fri, 27 Nov 2020 16:54:50 +0000
|
|
Subject: [PATCH] apr_encode_base32: fix advertised output *len when called
|
|
with dst == NULL.
|
|
|
|
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883868 13f79535-47bb-0310-9956-ffa450edef68
|
|
---
|
|
encoding/apr_encode.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/encoding/apr_encode.c b/encoding/apr_encode.c
|
|
index e44ae11f0..b3278c7fd 100644
|
|
--- a/encoding/apr_encode.c
|
|
+++ b/encoding/apr_encode.c
|
|
@@ -665,7 +665,7 @@ APR_DECLARE(apr_status_t) apr_encode_base32(char *dest, const char *src,
|
|
}
|
|
|
|
if (len) {
|
|
- *len = ((slen + 2) / 3 * 4) + 1;
|
|
+ *len = ((slen + 4) / 5 * 8) + 1;
|
|
}
|
|
|
|
return APR_SUCCESS;
|
|
--
|
|
2.27.0
|
|
|