From 4add537e2e0e9848de7670df8c6fdf66f27996ab Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sun, 20 Sep 2009 20:57:34 +0200 Subject: [PATCH] dma: allow empty sender in queue files Empty senders happen when a bounce gets queued, so we need to accept such queue files. --- libexec/dma/spool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/dma/spool.c b/libexec/dma/spool.c index 23f6e420e0..0c5d50beb9 100644 --- a/libexec/dma/spool.c +++ b/libexec/dma/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); -- 2.11.4.GIT