diff options
author | Alain Magloire <alainm@gnu.org> | 2001-05-20 04:34:35 +0000 |
---|---|---|
committer | Alain Magloire <alainm@gnu.org> | 2001-05-20 04:34:35 +0000 |
commit | 180d9a5d7929637e49a3b2079b12b5eecb6be194 (patch) | |
tree | 0fe9d7722c826909dbdd4abf9e0bee702b101b3c | |
parent | c3f76eee2222a35197acb9bfbd03e272d5a51ad0 (diff) | |
download | mailutils-180d9a5d7929637e49a3b2079b12b5eecb6be194.tar.gz mailutils-180d9a5d7929637e49a3b2079b12b5eecb6be194.tar.bz2 |
buglet fix.
-rw-r--r-- | mailbox/address.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mailbox/address.c b/mailbox/address.c index eadf22a56..3ffffa6a1 100644 --- a/mailbox/address.c +++ b/mailbox/address.c @@ -53,7 +53,8 @@ address_create (address_t *a, const char *s) return ENOMEM; /* We need to unfold the string. Do the same thing as parse822_field_body() - but we have to be more flexible in allowing bare '\n' as CRLF. */ + but we have to be more flexible in allowing bare '\n' as CRLF for + unix-mbox. This is may not be the right approach still. */ for (;;) { const char *eol = s; @@ -71,10 +72,13 @@ address_create (address_t *a, const char *s) fb[len + (eol - s)] = '\0'; s = eol; - if (s == e) + if (eol == e) break; /* no more, so we're done */ - s += 2; + s++; + + if (s == e) + break; /* no more, so we're done */ /* check if next line is a continuation line */ if (*s != ' ' && *s != '\t') |