[Commits] [SCM] claws branch, master, updated. 4.2.0-82-g2015296f5

mones at claws-mail.org mones at claws-mail.org
Fri Apr 12 14:43:16 UTC 2024


The branch, master has been updated
       via  2015296f5d228f7b9264dbf57b827fec33aca14a (commit)
      from  507ce6782cdb711b4c41d36c884b8d2ca48cb29a (commit)

Summary of changes:
 src/common/passcrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 2015296f5d228f7b9264dbf57b827fec33aca14a
Author: Olaf Hering <olaf at aepfle.de>
Date:   Fri Apr 12 16:42:32 2024 +0200

    Fix bug 4787 "Use correct function for memory transfer in crypt_cfb_buf"
    
    There are really just 8 bytes of memory to transfer from one place to
    another. No C strings involved.
    
    warning: 'strncpy' output truncated before terminating nul copying 8
    bytes from a string of the same length [-Wstringop-truncation]
    
    Signed-off-by: Olaf Hering <olaf at aepfle.de>

diff --git a/src/common/passcrypt.c b/src/common/passcrypt.c
index 73d1b5655..5236fa5a9 100644
--- a/src/common/passcrypt.c
+++ b/src/common/passcrypt.c
@@ -61,7 +61,7 @@ crypt_cfb_buf(const char key[8], unsigned char *buf, unsigned len,
 {
 	char des_key[8];
 	
-	strncpy(des_key, PASSCRYPT_KEY, 8);
+	memcpy(des_key, PASSCRYPT_KEY, 8);
 	des_setparity(des_key);
 	if (decrypt)
 		ecb_crypt(des_key, buf, len, DES_DECRYPT);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list