* [PATCH] avoid segfault when calling sanitize_string() on NULL
@ 2011-05-10 16:25 Daniel Kahn Gillmor
2011-05-10 16:35 ` Jameson Graef Rollins
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kahn Gillmor @ 2011-05-10 16:25 UTC (permalink / raw)
To: notmuch
---
notmuch-search.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index 794b145..26b24eb 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -116,6 +116,9 @@ sanitize_string (const void *ctx, const char *str)
{
char *out, *loop;
+ if (NULL == str)
+ return NULL;
+
loop = out = talloc_strdup (ctx, str);
for (; *loop; loop++) {
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-10 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 16:25 [PATCH] avoid segfault when calling sanitize_string() on NULL Daniel Kahn Gillmor
2011-05-10 16:35 ` Jameson Graef Rollins
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).