mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-01 07:04:10 +01:00
Avoid segfault on message with no subject.
It's fun how turning a program loose on 500,000 messages will find lots of littel corner cases.
This commit is contained in:
parent
d643f7d776
commit
914df660c4
1 changed files with 3 additions and 0 deletions
|
@ -253,6 +253,9 @@ skip_re_in_subject (const char *subject)
|
||||||
{
|
{
|
||||||
const char *s = subject;
|
const char *s = subject;
|
||||||
|
|
||||||
|
if (subject == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
while (*s) {
|
while (*s) {
|
||||||
while (*s && isspace (*s))
|
while (*s && isspace (*s))
|
||||||
s++;
|
s++;
|
||||||
|
|
Loading…
Reference in a new issue