projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d643f7d
)
Avoid segfault on message with no subject.
author
Carl Worth
<cworth@cworth.org>
Thu, 15 Oct 2009 00:24:28 +0000
(17:24 -0700)
committer
Carl Worth
<cworth@cworth.org>
Thu, 15 Oct 2009 00:24:28 +0000
(17:24 -0700)
It's fun how turning a program loose on 500,000 messages will find
lots of littel corner cases.
notmuch-index-message.cc
patch
|
blob
|
history
diff --git
a/notmuch-index-message.cc
b/notmuch-index-message.cc
index 60370b62b99621f6d8ec1eea491d0b5b96c003ad..5c73825ba2f48e3d7964994d497e104c1a6464a0 100644
(file)
--- a/
notmuch-index-message.cc
+++ b/
notmuch-index-message.cc
@@
-253,6
+253,9
@@
skip_re_in_subject (const char *subject)
{
const char *s = subject;
+ if (subject == NULL)
+ return NULL;
+
while (*s) {
while (*s && isspace (*s))
s++;