mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
avoid segfault when calling sanitize_string() on NULL
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
This commit is contained in:
parent
d3fdb76c8d
commit
8a7d4aa1b1
1 changed files with 3 additions and 0 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue