buglet fix.
Showing
1 changed file
with
7 additions
and
3 deletions
... | @@ -53,7 +53,8 @@ address_create (address_t *a, const char *s) | ... | @@ -53,7 +53,8 @@ address_create (address_t *a, const char *s) |
53 | return ENOMEM; | 53 | return ENOMEM; |
54 | 54 | ||
55 | /* We need to unfold the string. Do the same thing as parse822_field_body() | 55 | /* We need to unfold the string. Do the same thing as parse822_field_body() |
56 | but we have to be more flexible in allowing bare '\n' as CRLF. */ | 56 | but we have to be more flexible in allowing bare '\n' as CRLF for |
57 | unix-mbox. This is may not be the right approach still. */ | ||
57 | for (;;) | 58 | for (;;) |
58 | { | 59 | { |
59 | const char *eol = s; | 60 | const char *eol = s; |
... | @@ -71,10 +72,13 @@ address_create (address_t *a, const char *s) | ... | @@ -71,10 +72,13 @@ address_create (address_t *a, const char *s) |
71 | fb[len + (eol - s)] = '\0'; | 72 | fb[len + (eol - s)] = '\0'; |
72 | 73 | ||
73 | s = eol; | 74 | s = eol; |
74 | if (s == e) | 75 | if (eol == e) |
75 | break; /* no more, so we're done */ | 76 | break; /* no more, so we're done */ |
76 | 77 | ||
77 | s += 2; | 78 | s++; |
79 | |||
80 | if (s == e) | ||
81 | break; /* no more, so we're done */ | ||
78 | 82 | ||
79 | /* check if next line is a continuation line */ | 83 | /* check if next line is a continuation line */ |
80 | if (*s != ' ' && *s != '\t') | 84 | if (*s != ' ' && *s != '\t') | ... | ... |
-
Please register or sign in to post a comment