From: Ricardo Mones Date: Wed, 21 Aug 2019 09:36:40 +0000 (+0200) Subject: Don't call strncpy with mismatching length X-Git-Tag: 3.17.5~89 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=960195482505a5d3facf15fbfb61817b11e9a08c;hp=14a29d805264e51c75f112f056913192ee6e669a 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;