Add a patch to fix o_size calculation for gensalt_yescrypt_rn
This commit is contained in:
parent
692cc274a7
commit
871fd0c1fc
@ -0,0 +1,25 @@
|
||||
From dc75db8c5f17733d4212201f2554e5d5e093c1b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||
Date: Sat, 5 Jun 2021 19:40:39 +0200
|
||||
Subject: [PATCH] lib/crypt-yescrypt.c: Fix output calculation for
|
||||
gensalt_yescrypt_rn().
|
||||
|
||||
---
|
||||
lib/crypt-yescrypt.c | 4 ++--
|
||||
1 file 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;
|
@ -153,7 +153,7 @@ fi \
|
||||
|
||||
Name: libxcrypt
|
||||
Version: 4.4.22
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
|
||||
|
||||
# For explicit license breakdown, see the
|
||||
@ -163,6 +163,7 @@ URL: https://github.com/besser82/%{name}
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Patch 0000 - 2999: Backported patches from upstream.
|
||||
Patch0000: %{url}/commit/dc75db8c5f17733d4212201f2554e5d5e093c1b3.patch#/%{name}-4.4.22-fix_gensalt_yescrypt_o_size_calculation.patch
|
||||
|
||||
# Patch 3000 - 5999: Backported patches from pull requests.
|
||||
|
||||
@ -525,6 +526,9 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Jun 05 2021 Björn Esser <besser82@fedoraproject.org> - 4.4.22-2
|
||||
- Add a patch to fix o_size calculation for gensalt_yescrypt_rn
|
||||
|
||||
* Thu May 27 2021 Björn Esser <besser82@fedoraproject.org> - 4.4.22-1
|
||||
- New upstream release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user