* [PATCH] Fixing possible dereferencing of NULL pointer
@ 2010-04-12 17:45 Dirk Hohndel
0 siblings, 0 replies; only message in thread
From: Dirk Hohndel @ 2010-04-12 17:45 UTC (permalink / raw)
To: notmuch
I must have misunderstood the cases in which this function can be called
It seemed odd to try to manage authors when author==NULL, but that's
what we appear to be doing; so now we check that autho != NULL and bail
otherwise.
Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
---
lib/thread.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/thread.cc b/lib/thread.cc
index c3c83a3..93a7264 100644
--- a/lib/thread.cc
+++ b/lib/thread.cc
@@ -88,7 +88,7 @@ _thread_move_matched_author (notmuch_thread_t *thread,
char *currentauthor;
int idx,nmstart,author_len,authors_len;
- if (thread->authors == NULL)
+ if (thread->authors == NULL || author == NULL)
return;
if (thread->nonmatched_authors == NULL)
thread->nonmatched_authors = thread->authors;
--
1.6.6.1
--
Dirk Hohndel
Intel Open Source Technology Center
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-12 17:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12 17:45 [PATCH] Fixing possible dereferencing of NULL pointer Dirk Hohndel
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).