[Commits] [SCM] claws branch, master, updated. 3.17.4-9-g960195482

mones at claws-mail.org mones at claws-mail.org
Wed Aug 21 11:37:02 CEST 2019


The branch, master has been updated
       via  960195482505a5d3facf15fbfb61817b11e9a08c (commit)
      from  14a29d805264e51c75f112f056913192ee6e669a (commit)

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


- Log -----------------------------------------------------------------
commit 960195482505a5d3facf15fbfb61817b11e9a08c
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Aug 21 11:36:40 2019 +0200

    Don't call strncpy with mismatching length
    
    Fixes "vcard.c:238:2: warning: ‘strncpy’ output truncated before
    terminating nul copying as many bytes from a string as its length"

diff --git a/src/vcard.c b/src/vcard.c
index 463f4a35d..2e8fce511 100644
--- a/src/vcard.c
+++ b/src/vcard.c
@@ -235,7 +235,7 @@ static gchar *vcard_get_line( VCardFile *cardFile ) {
 	start = cardFile->bufptr;
 	len = strlen( start );
 	end = start + len;
-	strncpy( buf, start, len );
+	memcpy( buf, start, len );
 	buf[ len ] = '\0';
 	g_strstrip(buf);
 	cardFile->bufptr = end + 1;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list