projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d574d71
)
fix buffer overrun
author
Wilfried Goesgens
<willi@arangodb.com>
Sun, 11 Oct 2015 21:26:26 +0000
(23:26 +0200)
committer
Wilfried Goesgens
<willi@arangodb.com>
Sun, 11 Oct 2015 21:26:26 +0000
(23:26 +0200)
webcit/msg_renderers.c
patch
|
blob
|
history
diff --git
a/webcit/msg_renderers.c
b/webcit/msg_renderers.c
index ec0ebd1b7205f894ccd12b7796e2b9ef32d09937..5bfc364e5266bb6ad69184462e6443d625bbc605 100644
(file)
--- a/
webcit/msg_renderers.c
+++ b/
webcit/msg_renderers.c
@@
-623,8
+623,9
@@
void render_MIME_VCard(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundCharse
Buf = NewStrBuf();
/** If it's my vCard I can edit it */
if ( (!strcasecmp(ChrPtr(WCC->CurRoom.name), USERCONFIGROOM))
Buf = NewStrBuf();
/** If it's my vCard I can edit it */
if ( (!strcasecmp(ChrPtr(WCC->CurRoom.name), USERCONFIGROOM))
- || (!strcasecmp(&(ChrPtr(WCC->CurRoom.name)[11]), USERCONFIGROOM))
- || (WC->CurRoom.view == VIEW_ADDRESSBOOK)
+ || ((StrLength(WCC->CurRoom.name) > 11) &&
+ (!strcasecmp(&(ChrPtr(WCC->CurRoom.name)[11]), USERCONFIGROOM)))
+ || (WCC->CurRoom.view == VIEW_ADDRESSBOOK)
) {
StrBufAppendPrintf(Buf, "<a href=\"edit_vcard?msgnum=%ld?partnum=%s\">",
Mime->msgnum, ChrPtr(Mime->PartNum));
) {
StrBufAppendPrintf(Buf, "<a href=\"edit_vcard?msgnum=%ld?partnum=%s\">",
Mime->msgnum, ChrPtr(Mime->PartNum));