From: Baptiste Daroussin Date: Thu, 26 Mar 2026 21:32:59 +0000 (+0100) Subject: prevent a crash in case of broken connection X-Git-Tag: RELEASE_2_0_0~37 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d17fb112f2df0b5223a702b04e0ea7eeae712de6;p=thirdparty%2Fmlmmj.git prevent a crash in case of broken connection --- diff --git a/src/checkwait_smtpreply.c b/src/checkwait_smtpreply.c index a6fd692b..82b31878 100644 --- a/src/checkwait_smtpreply.c +++ b/src/checkwait_smtpreply.c @@ -40,7 +40,8 @@ char *checkwait_smtpreply(int sockfd, int replytype) do { free(smtpreply); smtpreply = mygetline(sockfd); - } while (strncmp(smtpreply, "250-", 4) == 0); + } while (smtpreply != NULL && + strncmp(smtpreply, "250-", 4) == 0); } else { smtpreply = mygetline(sockfd); }