Don't call strncpy with mismatching length
[claws.git] / src / vcard.c
index 463f4a35da1ee7cb4c2df33c31171ead28b15bc2..2e8fce511c1845509628b5159e570912196cdd8f 100644 (file)
@@ -235,7 +235,7 @@ static gchar *vcard_get_line( VCardFile *cardFile ) {
        start = cardFile->bufptr;
        len = strlen( start );
        end = start + len;
        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;
        buf[ len ] = '\0';
        g_strstrip(buf);
        cardFile->bufptr = end + 1;