From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: notmuch@notmuchmail.org
Subject: [PATCH] avoid segfault when calling sanitize_string() on NULL
Date: Tue, 10 May 2011 12:25:32 -0400 [thread overview]
Message-ID: <1305044732-13882-1-git-send-email-dkg@fifthhorseman.net> (raw)
---
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
next reply other threads:[~2011-05-10 16:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 16:25 Daniel Kahn Gillmor [this message]
2011-05-10 16:35 ` [PATCH] avoid segfault when calling sanitize_string() on NULL Jameson Graef Rollins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305044732-13882-1-git-send-email-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).