-rw-r--r-- | kmicromail/libetpan/generic/pop3driver.c | 9 | ||||
-rw-r--r-- | kmicromail/libetpan/pop3/mailpop3.c | 5 | ||||
-rw-r--r-- | kmicromail/libetpan/tools/mailstream_helper.c | 11 |
3 files changed, 19 insertions, 6 deletions
diff --git a/kmicromail/libetpan/generic/pop3driver.c b/kmicromail/libetpan/generic/pop3driver.c index 375879e..475dfcc 100644 --- a/kmicromail/libetpan/generic/pop3driver.c +++ b/kmicromail/libetpan/generic/pop3driver.c | |||
@@ -272,6 +272,9 @@ static int pop3driver_login(mailsession * session, | |||
272 | } | 272 | } |
273 | // LR 2 lines | ||
274 | int ret = pop3driver_pop3_error_to_mail_error(r); | ||
275 | if ( ret == MAIL_NO_ERROR ) | ||
276 | mailpop3_list(get_pop3_session(session), &msg_tab); | ||
273 | 277 | ||
274 | mailpop3_list(get_pop3_session(session), &msg_tab); | 278 | // LR |
275 | 279 | return ret; | |
276 | return pop3driver_pop3_error_to_mail_error(r); | ||
277 | } | 280 | } |
diff --git a/kmicromail/libetpan/pop3/mailpop3.c b/kmicromail/libetpan/pop3/mailpop3.c index 28fafe9..691b07a 100644 --- a/kmicromail/libetpan/pop3/mailpop3.c +++ b/kmicromail/libetpan/pop3/mailpop3.c | |||
@@ -510,4 +510,7 @@ int mailpop3_pass(mailpop3 * f, const char * password) | |||
510 | 510 | ||
511 | if (r != RESPONSE_OK) | 511 | if (r != RESPONSE_OK) { |
512 | // LR | ||
513 | fprintf(stderr,"POP3 login error. Response from server:\n%s\n",response ); | ||
512 | return MAILPOP3_ERROR_BAD_PASSWORD; | 514 | return MAILPOP3_ERROR_BAD_PASSWORD; |
515 | } | ||
513 | 516 | ||
diff --git a/kmicromail/libetpan/tools/mailstream_helper.c b/kmicromail/libetpan/tools/mailstream_helper.c index 146f955..92f4ffe 100644 --- a/kmicromail/libetpan/tools/mailstream_helper.c +++ b/kmicromail/libetpan/tools/mailstream_helper.c | |||
@@ -100,4 +100,11 @@ char * mailstream_read_line_append(mailstream * stream, MMAPString * line) | |||
100 | 100 | ||
101 | if (r == 0) | 101 | if (r == 0) { |
102 | break; | 102 | // LR |
103 | // this avoids a memory access violation later when trying | ||
104 | // to remove_trailing_eol from a null string | ||
105 | if ( line->len == 0 ) | ||
106 | return NULL; | ||
107 | else | ||
108 | break; | ||
109 | } | ||
103 | } | 110 | } |