From 4b166000118784af14f8999d6482e0228e900d34 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 3 May 2016 13:52:04 -0600 Subject: [PATCH] fix type comparison on 32bit for starttls, zero tmp buffer --- examples/client/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index 55bc68476..46b08304f 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -344,6 +344,8 @@ int StartTLS_Init(SOCKET_T* sockfd) if (sockfd == NULL) return BAD_FUNC_ARG; + XMEMSET(tmpBuf, 0, sizeof(tmpBuf)); + /* S: 220 SMTP service ready */ if (recv(*sockfd, tmpBuf, sizeof(tmpBuf), 0) < 0) err_sys("failed to read STARTTLS command\n"); @@ -357,7 +359,7 @@ int StartTLS_Init(SOCKET_T* sockfd) /* C: EHLO mail.example.com */ if (send(*sockfd, starttlsCmd[1], (int)XSTRLEN(starttlsCmd[1]), 0) != - (word32)XSTRLEN(starttlsCmd[1])) + (int)XSTRLEN(starttlsCmd[1])) err_sys("failed to send STARTTLS EHLO command\n"); /* S: 250 offers a warm hug of welcome */ @@ -373,7 +375,7 @@ int StartTLS_Init(SOCKET_T* sockfd) /* C: STARTTLS */ if (send(*sockfd, starttlsCmd[3], (int)XSTRLEN(starttlsCmd[3]), 0) != - (word32)XSTRLEN(starttlsCmd[3])) { + (int)XSTRLEN(starttlsCmd[3])) { err_sys("failed to send STARTTLS command\n"); }