projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ce1a57
)
* StrBufSanitizeEmailRecipientVector(): fix some NULL problems
author
Wilfried Göesgens
<willi@citadel.org>
Mon, 28 Jun 2010 18:59:08 +0000
(18:59 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Mon, 28 Jun 2010 18:59:08 +0000
(18:59 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index f4a43c3031b61080300ba0ef01af242d4a582286..861c1d2f991b10e06c42a4b17bf0b43fae67db83 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-2569,6
+2569,7
@@
StrBuf *StrBufSanitizeEmailRecipientVector(const StrBuf *Recp,
At = strchr(EmailStart, '@');
}
else { /* this is a local recipient... no domain, just a realname */
+ EmailStart = UserStart;
At = strchr(EmailStart, '@');
if (At == NULL) {
UserEnd = EmailEnd;
@@
-2595,9
+2596,9
@@
StrBuf *StrBufSanitizeEmailRecipientVector(const StrBuf *Recp,
- if (
*pch == ','
)
+ if (
(pch != NULL) && (*pch == ',')
)
pch ++;
- while (isspace(*pch))
+
if (pch != NULL)
while (isspace(*pch))
pch ++;
}
return Target;