← Commit list

a49e4e3d16

TheBitBrine
TheBitBrine
2025-10-26
SUCCESS Duration: 154s

Subject

pop3: fix CAPA response termination detection

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/pop3.c+4 -2
@@ -323,8 +323,10 @@ static bool pop3_endofresp(struct Curl_easy *data, struct connectdata *conn,
/* Are we processing CAPA command responses? */
if(pop3c->state == POP3_CAPA) {
- /* Do we have the terminating line? */
- if(len >= 1 && line[0] == '.')
+ /* Do we have the terminating line? Per RFC 2449 this is a line
+ containing only a single dot */
+ if((len == 3 && line[0] == '.' && line[1] == '\r') ||
+ (len == 2 && line[0] == '.' && line[1] == '\n'))
/* Treat the response as a success */
*resp = '+';
else