projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14a29d8
)
Don't call strncpy with mismatching length
author
Ricardo Mones
<ricardo@mones.org>
Wed, 21 Aug 2019 09:36:40 +0000
(11:36 +0200)
committer
Ricardo Mones
<ricardo@mones.org>
Wed, 21 Aug 2019 09:36:40 +0000
(11:36 +0200)
Fixes "vcard.c:238:2: warning: ‘strncpy’ output truncated before
terminating nul copying as many bytes from a string as its length"
src/vcard.c
patch
|
blob
|
history
diff --git
a/src/vcard.c
b/src/vcard.c
index 463f4a35da1ee7cb4c2df33c31171ead28b15bc2..2e8fce511c1845509628b5159e570912196cdd8f 100644
(file)
--- 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;
-
strn
cpy( buf, start, len );
+
mem
cpy( buf, start, len );
buf[ len ] = '\0';
g_strstrip(buf);
cardFile->bufptr = end + 1;