summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Esser <besser82@fedoraproject.org>2021-06-05 19:40:39 +0200
committerBjörn Esser <besser82@fedoraproject.org>2021-06-05 19:41:06 +0200
commitdc75db8c5f17733d4212201f2554e5d5e093c1b3 (patch)
treea4cf004b55fc13d784f4bbfacfb5a09c27503c3b
parent0e467eb71774ba356c94f57061ee6be4ca6b6e33 (diff)
downloadlibxcrypt-dc75db8c5f17733d4212201f2554e5d5e093c1b3.tar.gz
libxcrypt-dc75db8c5f17733d4212201f2554e5d5e093c1b3.tar.bz2
libxcrypt-dc75db8c5f17733d4212201f2554e5d5e093c1b3.zip
lib/crypt-yescrypt.c: Fix output calculation for gensalt_yescrypt_rn().
-rw-r--r--lib/crypt-yescrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypt-yescrypt.c b/lib/crypt-yescrypt.c
index b2daf16..84b7f19 100644
--- a/lib/crypt-yescrypt.c
+++ b/lib/crypt-yescrypt.c
@@ -106,8 +106,8 @@ gensalt_yescrypt_rn (unsigned long count,
const uint8_t *rbytes, size_t nrbytes,
uint8_t *output, size_t o_size)
{
- if (o_size < 3 + 8 * 6 + BASE64_LEN (nrbytes) + 1 ||
- CRYPT_GENSALT_OUTPUT_SIZE < 3 + 8 * 6 + BASE64_LEN (nrbytes) + 1)
+ if (o_size < 3 + 8 * 6 + 1 + BASE64_LEN (nrbytes) + 1 ||
+ CRYPT_GENSALT_OUTPUT_SIZE < 3 + 8 * 6 + 1 + BASE64_LEN (nrbytes) + 1)
{
errno = ERANGE;
return;