diff options
Diffstat (limited to 'smtp.c')
-rw-r--r-- | smtp.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -135,17 +135,16 @@ static const char * message_cb (void **buf, int *len, void *arg) int octets; if (len == NULL) + { + /* only allow rewinding in the beginning of a message otherwise + * it will break the pipes */ assert(*buf == NULL); + return; + } if (*buf == NULL) *buf = malloc (BUFSIZ); - if (len == NULL) - { - message_rewind(message); - return NULL; - } - *len = message_read(message, *buf, BUFSIZ); return *buf; |