From fb7c7bbe6b2828c72df0205d02ec72f1aa4adf7e Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Mon, 10 Oct 2005 17:17:24 +0000 Subject: [PATCH] Accept + as IMAP continuation, not just + . May close #2106. Feed check_sec candy in setenv.c. --- imap/command.c | 4 +--- setenv.c | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/imap/command.c b/imap/command.c index 4eabc0d7..076137fe 100644 --- a/imap/command.c +++ b/imap/command.c @@ -151,10 +151,8 @@ int imap_cmd_step (IMAP_DATA* idata) return IMAP_CMD_BAD; /* server demands a continuation response from us */ - if (!ascii_strncmp (cmd->buf, "+ ", 2)) - { + if (cmd->buf[0] == '+') return IMAP_CMD_RESPOND; - } /* tagged completion code */ if (!ascii_strncmp (cmd->buf, cmd->seq, SEQLEN)) diff --git a/setenv.c b/setenv.c index 0fd90198..6dd6c938 100644 --- a/setenv.c +++ b/setenv.c @@ -27,15 +27,15 @@ setenv(const char *name, const char *value, int overwrite) the intention is to provide a replacement for the standard library function which sets errno and returns in the event of a memory allocation failure. */ - envstring = malloc(strlen(name) + 1 + strlen(value) + 1); + envstring = malloc(strlen(name) + 1 + strlen(value) + 1); /* __MEM_CHECKED__ */ if (envstring == NULL) return -1; /* Build the environment string and add it to the environment using putenv. Systems without putenv lose, but XPG4 requires it. */ - strcpy(envstring, name); - strcat(envstring, "="); - strcat(envstring, value); + strcpy(envstring, name); /* __STRCPY_CHECKED__ */ + strcat(envstring, "="); /* __STRCAT_CHECKED__ */ + strcat(envstring, value); /* __STRCAT_CHECKED__ */ return putenv(envstring); /* Note that the memory allocated is not freed. This is intentional; -- 2.40.0