talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 960195482505a5d3facf15fbfb61817b11e9a08c
parent 14a29d805264e51c75f112f056913192ee6e669a
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed, 21 Aug 2019 11:36:40 +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"

Diffstat:
Msrc/vcard.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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;