summaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-12-20 20:17:59 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-12-20 20:17:59 +0000
commit812c5ace759d04c2f0513f7ffe58f32673da2514 (patch)
treea3fc50d21e7019d2fd3d54b5e29db2c36bd4b073 /lib/pop3.c
parentc3a02c3e5489cd5ef174bda4f40315d9ee95b285 (diff)
downloadcurl-812c5ace759d04c2f0513f7ffe58f32673da2514.tar.gz
pop3: Fixed APOP timestamp detection from commit 1cfb436a2f1795
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 62c7b041c..782458ada 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -659,11 +659,11 @@ static CURLcode pop3_state_servergreet_resp(struct connectdata *conn,
}
else {
/* Look for the APOP timestamp */
- if(len >= 3 && line[len - 3] == '>') {
- for(i = 0; i < len - 3; ++i) {
+ if(len >= 4 && line[len - 2] == '>') {
+ for(i = 3; i < len - 2; ++i) {
if(line[i] == '<') {
/* Calculate the length of the timestamp */
- size_t timestamplen = len - 2 - i;
+ size_t timestamplen = len - 1 - i;
if(!timestamplen)
break;