projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dab34a9
)
* add additional bytes to the buffer, so swapping names doesn't buffer overrun. Fixes...
author
Wilfried Göesgens
<willi@citadel.org>
Mon, 27 Jul 2009 18:10:21 +0000
(18:10 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Mon, 27 Jul 2009 18:10:21 +0000
(18:10 +0000)
webcit/vcard_edit.c
patch
|
blob
|
history
diff --git
a/webcit/vcard_edit.c
b/webcit/vcard_edit.c
index b690e01cc383928c9f14edfb9d74a6bf7192ac38..e05bb11c20c13669cebc61583f2a57a067b8c543 100644
(file)
--- a/
webcit/vcard_edit.c
+++ b/
webcit/vcard_edit.c
@@
-253,7
+253,12
@@
void fetchname_parsed_vcard(struct vCard *v, char **storename) {
len);
}
else {
- *storename = strdup(name);
+ size_t len;
+
+ len = strlen (name);
+
+ *storename = malloc(len + 3); /* \0 + eventualy missing ', '*/
+ memcpy(*storename, name, len + 1);
}
/* vcard_n_prettyize(storename); */
}