commit:     23baf35dda74da80cbf14568c20b5349f180e572
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sat May 31 22:42:50 2025 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sat May 31 22:49:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=23baf35d

app-crypt/reop: Fix bcrypt_hash length

Closes: https://bugs.gentoo.org/956772
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 .../reop-2.1.1-bcrypt_hash-cdata-sizeof.patch      | 24 +++++++++++++++++++---
 .../{reop-2.1.1-r1.ebuild => reop-2.1.1-r2.ebuild} |  0
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch 
b/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch
index d418740d3d..95d8690d8c 100644
--- a/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch
+++ b/app-crypt/reop/files/reop-2.1.1-bcrypt_hash-cdata-sizeof.patch
@@ -1,11 +1,29 @@
+From 04a2240bd8f465bcae6b595d912af3e2965856de Mon Sep 17 00:00:00 2001
+From: millert <[email protected]>
+Date: Thu, 9 Jul 2020 19:17:19 +0000
+Subject: [PATCH] Fix a warning false positive from clang 10. blf_enc() takes a
+ number of 64-bit blocks to encrypt, but using sizeof(uint64_t) in the
+ calculation triggers a warning from clang 10 because the actual data type is
+ uint32_t.  Pass BCRYPT_WORDS / 2 for the number of blocks like libc bcrypt(3)
+ does.  OK kettenis@
+
+
+---
+Haelwenn (lanodan) Monnier: Substituted BCRYPT_WORDS for 8, removed $OpenBSD$ 
hunk
+
+ sys/lib/libsa/bcrypt_pbkdf.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sys/lib/libsa/bcrypt_pbkdf.c b/sys/lib/libsa/bcrypt_pbkdf.c
+index 4020ada74a43..df0e34c4e46d 100644
 --- a/other/other.c
 +++ b/other/other.c
-@@ -659,7 +659,7 @@ bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, 
u_int8_t *out)
+@@ -76,7 +76,7 @@ bcrypt_hash(uint8_t *sha2pass, uint8_t *sha2salt, uint8_t 
*out)
                cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext),
                    &j);
        for (i = 0; i < 64; i++)
 -              blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t));
-+              blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint32_t));
++              blf_enc(&state, cdata, 8 / 2);
  
        /* copy out */
-       for (i = 0; i < BCRYPT_BLOCKS; i++) {
+       for (i = 0; i < BCRYPT_WORDS; i++) {

diff --git a/app-crypt/reop/reop-2.1.1-r1.ebuild 
b/app-crypt/reop/reop-2.1.1-r2.ebuild
similarity index 100%
rename from app-crypt/reop/reop-2.1.1-r1.ebuild
rename to app-crypt/reop/reop-2.1.1-r2.ebuild

Reply via email to