fix threadid NULL deref
[mmh] / sbr / getthreadid.c
index a1ad7a0..abac78d 100644 (file)
@@ -54,8 +54,11 @@ threadid(char *msgid, char *referens)
        }
 
        start = strchr(threadfrom, '<');
+       if (!start) {
+               return NULL;
+       }
        end = strchr(start, '>');
-       if (!(*start) || !(*end)) {
+       if (!end) {
                return NULL;
        }
        *end = '\0';