projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3fdb76
)
avoid segfault when calling sanitize_string() on NULL
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sat, 28 May 2011 21:51:52 +0000
(14:51 -0700)
committer
Carl Worth
<cworth@cworth.org>
Fri, 3 Jun 2011 19:30:55 +0000
(12:30 -0700)
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
notmuch-search.c
patch
|
blob
|
history
diff --git
a/notmuch-search.c
b/notmuch-search.c
index 530cecc343b9f928517176a830d1662874609574..616fe68a12f8253045a4faa973571e1303823a2f 100644
(file)
--- 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++) {