[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-81-g7ea21d645

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


The branch, gtk2 has been updated
       via  7ea21d6456ce9e3b59d4178a1adcbbe1d26b17e7 (commit)
      from  36f1b34ab24b72e82028cf2a82769a3b678fbb91 (commit)

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


- Log -----------------------------------------------------------------
commit 7ea21d6456ce9e3b59d4178a1adcbbe1d26b17e7
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 5b3a1dbe8..9108b26e2 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