From: Simon Schubert Date: Sun, 20 Sep 2009 18:57:34 +0000 (+0200) Subject: dma: allow empty sender in queue files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7aa2b3b7c1383714243c691bc5cefb72d644e0e7;p=people%2Fms%2Fdma.git dma: allow empty sender in queue files Empty senders happen when a bounce gets queued, so we need to accept such queue files. --- diff --git a/spool.c b/spool.c index 23f6e42..0c5d50b 100644 --- a/spool.c +++ b/spool.c @@ -176,7 +176,7 @@ readqueuef(struct queue *queue, char *queuefn) s++; s = strdup(s); - if (s == NULL || s[0] == 0) + if (s == NULL) goto malformed; if (strcmp(line, "ID") == 0) { @@ -192,7 +192,8 @@ readqueuef(struct queue *queue, char *queuefn) } } - if (queueid == NULL || sender == NULL || addr == NULL) { + if (queueid == NULL || sender == NULL || addr == NULL || + *queueid == 0 || *addr == 0) { malformed: errno = EINVAL; syslog(LOG_ERR, "malformed queue file `%s'", queuefn);