Gerrit E.G. Hobbelt wrote:
> See below for a copy, COMPLETE diff/patch is attached to this reply:
>
Since 7z attachments get stripped, here it is in literal uncompressed 
format:




--- ../../1original/xmail/CTRLClient.cpp        2007-11-02 01:34:32.000000000 
+0100
+++ ./CTRLClient.cpp    2007-11-15 00:19:55.000000000 +0100
@@ -216,6 +216,8 @@
        /* Get server address */
        SYS_INET_ADDR SvrAddr;
 
+       ZeroData(SvrAddr);
+
        if (MscGetServerAddress(pszServer, SvrAddr, iPortNo) < 0)
                return INVALID_BSOCK_HANDLE;
 
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/CTRLSvr.cpp ./CTRLSvr.cpp
--- ../../1original/xmail/CTRLSvr.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./CTRLSvr.cpp       2007-11-15 00:37:21.000000000 +0100
@@ -224,6 +224,8 @@
        if (SysExistFile(szIPMapFile)) {
                SYS_INET_ADDR PeerInfo;
 
+               ZeroData(PeerInfo);
+       
                if (SysGetPeerInfo(SockFD, PeerInfo) < 0)
                        return ErrGetErrorCode();
 
@@ -354,6 +356,8 @@
        /* Get client socket information */
        SYS_INET_ADDR PeerInfo;
 
+       ZeroData(PeerInfo);
+       
        if (SysGetPeerInfo(pThCtx->SockFD, PeerInfo) < 0) {
                ErrorPush();
                SysLogMessage(LOG_LEV_ERROR, "%s\n", ErrGetErrorString());
@@ -622,6 +626,8 @@
        SYS_INET_ADDR SockInfo;
        char szTimeStamp[256] = "";
 
+       ZeroData(SockInfo);
+       
        SysGetSockInfo(BSckGetAttachedSocket(hBSock), SockInfo);
 
        char szIP[128] = "???.???.???.???";
@@ -1579,6 +1585,8 @@
        char szIPAddr[128] = "0.0.0.0";
        char szLoginTime[128] = "";
 
+       ZeroData(LoginInfo);
+
        if (UPopGetLastLoginInfo(pUI, &LoginInfo) == 0) {
                SysInetNToA(LoginInfo.Address, szIPAddr, sizeof(szIPAddr));
                LTime = LoginInfo.LTime;
Only in .: debug
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/DNS.cpp ./DNS.cpp
--- ../../1original/xmail/DNS.cpp       2007-11-02 01:34:32.000000000 +0100
+++ ./DNS.cpp   2007-11-15 00:19:25.000000000 +0100
@@ -415,6 +415,9 @@
        SYS_INET_ADDR SvrAddr;
        SYS_INET_ADDR SockAddr;
 
+       ZeroData(SvrAddr);
+       ZeroData(SockAddr);
+       
        if (MscCreateClientSocket(pszDNSServer, iPortNo, SOCK_STREAM, &SockFD, 
&SvrAddr,
                                  &SockAddr, iTimeout) < 0)
                return NULL;
@@ -486,6 +489,10 @@
        SYS_INET_ADDR SvrAddr, SockAddr, RecvAddr;
        SYS_UINT8 RespBuffer[1024];
 
+       ZeroData(SvrAddr);
+       ZeroData(SockAddr);
+       ZeroData(RecvAddr);
+       
        *piTrunc = 0;
        if (MscCreateClientSocket(pszDNSServer, iPortNo, SOCK_DGRAM, &SockFD, 
&SvrAddr,
                                  &SockAddr, iTimeout) < 0)
Common subdirectories: ../../1original/xmail/docs and ./docs
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/Filter.cpp ./Filter.cpp
--- ../../1original/xmail/Filter.cpp    2007-11-02 01:34:32.000000000 +0100
+++ ./Filter.cpp        2007-11-15 00:43:55.000000000 +0100
@@ -272,7 +272,7 @@
        if (hResLock == INVALID_RLCK_HANDLE)
                return ErrGetErrorCode();
 
-       /* Open the filter database. Fail smootly if the file does not exist */
+       /* Open the filter database. Fail smoothly if the file does not exist */
        FILE *pFile = fopen(pszFilterFilePath, "rt");
 
        if (pFile == NULL) {
@@ -552,6 +552,8 @@
        /* Load the message info */
        FilterMsgInfo FMI;
 
+       ZeroData(FMI);
+
        if (FilLoadMsgInfo(hFSpool, FMI) < 0)
                return ErrGetErrorCode();
 
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/FINGSvr.cpp ./FINGSvr.cpp
--- ../../1original/xmail/FINGSvr.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./FINGSvr.cpp       2007-11-15 00:19:25.000000000 +0100
@@ -68,6 +68,8 @@
        if (SysExistFile(szIPMapFile)) {
                SYS_INET_ADDR PeerInfo;
 
+               ZeroData(PeerInfo);
+       
                if (SysGetPeerInfo(SockFD, PeerInfo) < 0)
                        return ErrGetErrorCode();
 
@@ -236,6 +238,8 @@
        /* Get client socket info */
        SYS_INET_ADDR PeerInfo;
 
+       ZeroData(PeerInfo);
+       
        if (SysGetPeerInfo(BSckGetAttachedSocket(hBSock), PeerInfo) < 0) {
                ErrorPush();
                BSckSendString(hBSock, ErrGetErrorString(ErrorFetch()), 
pFINGCfg->iTimeout);
Only in .: i_a-pre22.20071115.unified.diff
Only in .: install
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/MailSvr.cpp ./MailSvr.cpp
--- ../../1original/xmail/MailSvr.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./MailSvr.cpp       2007-11-15 00:37:21.000000000 +0100
@@ -145,7 +143,7 @@
 char szMailPath[SYS_MAX_PATH];
 QUEUE_HANDLE hSpoolQueue;
 SYS_SEMAPHORE hSyncSem;
-bool bServerDebug;
+bool bServerDebug = false; /* [i_a] */
 int iFilterTimeout = FILTER_TIMEOUT;
 bool bFilterLogEnabled = false;
 int iLogRotateHours = LOG_ROTATE_HOURS;
@@ -167,19 +165,19 @@
 static int iNumSMAILThreads;
 static int iNumLMAILThreads;
 static SYS_THREAD hCTRLThread;
-static ThreadConfig ThCfgCTRL;
+static ThreadConfig ThCfgCTRL = {0};
 static SYS_THREAD hCTRLSThread;
-static ThreadConfig ThCfgCTRLS;
+static ThreadConfig ThCfgCTRLS = {0};
 static SYS_THREAD hFINGThread;
-static ThreadConfig ThCfgFING;
+static ThreadConfig ThCfgFING = {0};
 static SYS_THREAD hPOP3Thread;
-static ThreadConfig ThCfgPOP3;
+static ThreadConfig ThCfgPOP3 = {0};
 static SYS_THREAD hPOP3SThread;
-static ThreadConfig ThCfgPOP3S;
+static ThreadConfig ThCfgPOP3S = {0};
 static SYS_THREAD hSMTPThread;
-static ThreadConfig ThCfgSMTP;
+static ThreadConfig ThCfgSMTP = {0};
 static SYS_THREAD hSMTPSThread;
-static ThreadConfig ThCfgSMTPS;
+static ThreadConfig ThCfgSMTPS = {0};
 static SYS_THREAD hSMAILThreads[MAX_SMAIL_THREADS];
 static SYS_THREAD hLMAILThreads[MAX_LMAIL_THREADS];
 static SYS_THREAD hPSYNCThread;
@@ -1525,7 +1523,9 @@
 
        if (SysInitLibrary() < 0) {
                ErrorPush();
-               SysEventLog(LOG_LEV_ERROR, "%s\n", ErrGetErrorString());
+               char *pszError = ErrGetErrorStringInfo(ErrGetErrorCode()); /* 
[i_a] */
+               SysLogMessage(LOG_LEV_ERROR, "%s\n", pszError);
+               SysFree(pszError);
                return ErrorPop();
        }
 
@@ -1534,14 +1534,19 @@
 
        if (ppszMergeArgs == NULL) {
                ErrorPush();
-               SysLogMessage(LOG_LEV_ERROR, "%s\n", ErrGetErrorString());
+               char *pszError = ErrGetErrorStringInfo(ErrGetErrorCode()); /* 
[i_a] */
+               SysLogMessage(LOG_LEV_ERROR, "%s\n", pszError);
+               SysFree(pszError);
+               /* SysLogMessage(LOG_LEV_ERROR, "%s\n", ErrGetErrorString()); */
                SysCleanupLibrary();
                return ErrorPop();
        }
 
        if (SvrSetup(iMergeArgsCount, ppszMergeArgs) < 0) {
                ErrorPush();
-               SysLogMessage(LOG_LEV_ERROR, "%s\n", ErrGetErrorString());
+               char *pszError = ErrGetErrorStringInfo(ErrGetErrorCode()); /* 
[i_a] */
+               SysLogMessage(LOG_LEV_ERROR, "%s\n", pszError);
+               SysFree(pszError);
                StrFreeStrings(ppszMergeArgs);
                SysCleanupLibrary();
                return ErrorPop();
@@ -1576,7 +1581,9 @@
 ErrorExit:
        if (iError < 0) {
                iError = ErrGetErrorCode();
-               SysLogMessage(LOG_LEV_ERROR, "%s\n", ErrGetErrorString());
+               char *pszError = ErrGetErrorStringInfo(iError); /* [i_a] */
+               SysLogMessage(LOG_LEV_ERROR, "%s\n", pszError);
+               SysFree(pszError);
        }
        /* Runs shutdown functions */
        SvrDoShutdown();
Only in .: mailsvr_Debug_NoService
Only in .: Main.cpp
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/MiscUtils.cpp ./MiscUtils.cpp
--- ../../1original/xmail/MiscUtils.cpp 2007-11-02 01:34:32.000000000 +0100
+++ ./MiscUtils.cpp     2007-11-15 00:37:21.000000000 +0100
@@ -629,6 +636,8 @@
 {
        SYS_INET_ADDR PeerInfo;
 
+       ZeroData(PeerInfo);
+
        if (SysGetPeerInfo(SockFD, PeerInfo) < 0)
                return ErrGetErrorCode();
 
@@ -639,6 +648,8 @@
 {
        SYS_INET_ADDR SockInfo;
 
+       ZeroData(SockInfo);
+
        if (SysGetSockInfo(SockFD, SockInfo) < 0)
                return ErrGetErrorCode();
 
@@ -795,6 +806,8 @@
 {
        SYS_INET_ADDR SvrAddr;
 
+       ZeroData(SvrAddr);
+
        if (MscGetServerAddress(pszServer, SvrAddr, iPortNo) < 0)
                return ErrGetErrorCode();
 
@@ -811,6 +824,8 @@
 
        SYS_INET_ADDR SockAddr;
 
+       ZeroData(SockAddr);
+
        if (SysGetSockInfo(SockFD, SockAddr) < 0) {
                ErrorPush();
                SysCloseSocket(SockFD);
@@ -837,6 +852,8 @@
 
                SYS_INET_ADDR InSvrAddr;
 
+               ZeroData(InSvrAddr);
+
                if (SysInetAnySetup(InSvrAddr, iFamily, iPortNo) < 0 ||
                    SysBindSocket(SvrSockFD, &InSvrAddr) < 0) {
                        ErrorPush();
@@ -936,6 +953,9 @@
        char const *pszMask;
        SYS_INET_ADDR Mask;
 
+       ZeroData(Mask);
+       ZeroData(AF);
+
        if ((pszMask = strchr(ppszFilter[0], '/')) != NULL) {
                int i;
                int iAddrLength = (int) (pszMask - ppszFilter[0]);
Only in .: mkusers
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/POP3Svr.cpp ./POP3Svr.cpp
--- ../../1original/xmail/POP3Svr.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./POP3Svr.cpp       2007-11-15 00:43:55.000000000 +0100
@@ -166,6 +166,8 @@
        if (SysExistFile(szIPMapFile)) {
                SYS_INET_ADDR PeerInfo;
 
+               ZeroData(PeerInfo);
+       
                if (SysGetPeerInfo(SockFD, PeerInfo) < 0 ||
                    MscCheckAllowedIP(szIPMapFile, PeerInfo, true) < 0)
                        return ErrGetErrorCode();
@@ -378,6 +380,8 @@
        /* Session structure declaration and init */
        POP3Session POP3S;
 
+       ZeroData(POP3S);
+
        if (POP3InitSession(pThCfg, hBSock, POP3S) < 0) {
                ErrorPush();
 
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/POP3Utils.cpp ./POP3Utils.cpp
--- ../../1original/xmail/POP3Utils.cpp 2007-11-02 01:34:32.000000000 +0100
+++ ./POP3Utils.cpp     2007-11-15 01:11:07.000000000 +0100
@@ -910,6 +910,8 @@
 {
        SYS_INET_ADDR SvrAddr;
 
+       ZeroData(SvrAddr);
+       
        if (MscGetServerAddress(pszServer, SvrAddr, STD_POP3_PORT) < 0)
                return INVALID_BSOCK_HANDLE;
 
@@ -924,6 +926,8 @@
        if (pChCfg->pszIFace != NULL) {
                SYS_INET_ADDR BndAddr;
 
+               ZeroData(BndAddr);
+       
                if (MscGetServerAddress(pChCfg->pszIFace, BndAddr, 0) < 0 ||
                    SysBindSocket(SockFD, &BndAddr) < 0) {
                        SysCloseSocket(SockFD);
@@ -1542,10 +1546,15 @@
        fclose(pIpFile);
 
        /* Do IP matching */
-       SYS_INET_ADDR PrevAddr, CurrAddr;
+       AddressFilter PrevAddr /* , CurrAddr */;
 
-       if (SysGetHostByName(szIP, SysGetAddrFamily(CurrAddr), PrevAddr) < 0 ||
-           !SysSameAddress(PrevAddr, CurrAddr)) {
+       ZeroData(PrevAddr);
+       /* make sure the mask is all 1's */
+       memset(&PrevAddr.Mask, 0xFF, sizeof(PrevAddr.Mask));
+
+       if (SysGetHostByName(szIP, SYS_INET46 /* SysGetAddrFamily(CurrAddr) */, 
PrevAddr.Addr) < 0 ||
+               pPeerInfo == NULL ||
+           !MscAddressMatch(PrevAddr, *pPeerInfo /* CurrAddr */)) {
                ErrSetErrorCode(ERR_NO_POP3_IP);
                return ERR_NO_POP3_IP;
        }
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/QueueUtils.cpp ./QueueUtils.cpp
--- ../../1original/xmail/QueueUtils.cpp        2007-11-02 01:34:32.000000000 
+0100
+++ ./QueueUtils.cpp    2007-11-15 00:19:25.000000000 +0100
@@ -795,6 +795,8 @@
                char szIP[128] = "???.???.???.???";
                char szServer[MAX_HOST_NAME] = "";
 
+               ZeroData(SvrAddr);
+       
                if (MscGetServerAddress(pszServer, SvrAddr) == 0 &&
                    SysGetHostByAddr(SvrAddr, szServer, sizeof(szServer)) == 0) 
{
                        pszServer = szServer;
Only in .: send_mail
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SendMail.cpp ./SendMail.cpp
--- ../../1original/xmail/SendMail.cpp  2007-11-02 01:34:32.000000000 +0100
+++ ./SendMail.cpp      2007-11-14 23:45:21.000000000 +0100
@@ -587,7 +596,8 @@
 
        if (pMailFile == NULL) {
                perror(szMailFile);
-               fclose(pDataFile), remove(szDataFile);
+               fclose(pDataFile);
+               remove(szDataFile);
                if (pInFile != stdin)
                        fclose(pInFile);
                return 5;
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SMAILUtils.cpp ./SMAILUtils.cpp
--- ../../1original/xmail/SMAILUtils.cpp        2007-11-02 01:34:32.000000000 
+0100
+++ ./SMAILUtils.cpp    2007-11-15 00:19:25.000000000 +0100
@@ -2234,6 +2234,8 @@
        SYS_INET_ADDR Addr;
        char szIP[256];
 
+       ZeroData(Addr);
+       
        if (*pszAddress != '[' ||
            (pszNext = (char const *) memchr(pszAddress, ']',
                                             (int) (pszTop - pszAddress))) == 
NULL ||
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SMTPSvr.cpp ./SMTPSvr.cpp
--- ../../1original/xmail/SMTPSvr.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./SMTPSvr.cpp       2007-11-15 00:26:14.000000000 +0100
@@ -897,6 +897,8 @@
        char *pszSMTPError = NULL;
        SMTPSession SMTPS;
 
+       ZeroData(SMTPS);
+
        if (SMTPInitSession(pThCfg, hBSock, SMTPS, pszSMTPError) < 0) {
                ErrorPush();
                if (pszSMTPError != NULL) {
@@ -1131,7 +1133,14 @@
        }
        /* Check SMTP after POP3 authentication */
        if (SvrTestConfigFlag("EnableAuthSMTP-POP3", true, SMTPS.hSvrConfig))
-               SMTPTryPopAuthIpCheck(SMTPS, szMailerUser, szMailerDomain);
+       {
+               if (SMTPTryPopAuthIpCheck(SMTPS, szMailerUser, szMailerDomain))
+               {
+                       SysLogMessage(LOG_LEV_DEBUG, "mail user '[EMAIL 
PROTECTED]' did not authenticate properly using SMTP-POP3: %d: %s\n",
+                               szMailerUser, szMailerDomain, 
ErrGetErrorCode(), ErrGetErrorString());
+                       return ErrGetErrorCode();
+               }
+       }
 
        /* Check extended mail from parameters */
        if (SMTPCheckMailParams(pszCommand, ppszRetDomains, SMTPS, 
pszSMTPError) < 0)
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SMTPUtils.cpp ./SMTPUtils.cpp
--- ../../1original/xmail/SMTPUtils.cpp 2007-11-02 01:34:32.000000000 +0100
+++ ./SMTPUtils.cpp     2007-11-15 00:19:25.000000000 +0100
@@ -1233,6 +1231,8 @@
 
        SYS_INET_ADDR SvrAddr;
 
+       ZeroData(SvrAddr);
+       
        if (MscGetServerAddress(szAddress, SvrAddr, iPortNo) < 0)
                return INVALID_SMTPCH_HANDLE;
 
@@ -1247,6 +1247,8 @@
        if (pGw->pszIFace != NULL) {
                SYS_INET_ADDR BndAddr;
 
+               ZeroData(BndAddr);
+       
                if (MscGetServerAddress(pGw->pszIFace, BndAddr, 0) < 0 ||
                    SysBindSocket(SockFD, &BndAddr) < 0) {
                        SysCloseSocket(SockFD);
@@ -1267,6 +1269,8 @@
                        SYS_INET_ADDR SockInfo;
                        char szIP[128] = "???.???.???.???";
 
+                       ZeroData(SockInfo);
+       
                        if (SysGetSockInfo(SockFD, SockInfo) < 0) {
                                SysCloseSocket(SockFD);
                                return INVALID_SMTPCH_HANDLE;
@@ -1707,6 +1711,8 @@
        char *pszMXDomains = NULL;
        SYS_INET_ADDR Addr;
 
+       ZeroData(Addr);
+       
        if (USmtpGetDomainMX(hSvrConfig, pszDomain, pszMXDomains) < 0) {
                if (SysGetHostByName(pszDomain, -1, Addr) < 0) {
                        ErrSetErrorCode(ERR_INVALID_MAIL_DOMAIN);
@@ -1830,6 +1836,9 @@
        SYS_INET_ADDR I4Addr, Addr;
        char szMapsQuery[256];
 
+       ZeroData(I4Addr);
+       ZeroData(Addr);
+       
        /*
         * Use the IPV4 reverse lookup syntax, if the address is a remapped
         * IPV4 address.
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SSLBind.cpp ./SSLBind.cpp
--- ../../1original/xmail/SSLBind.cpp   2007-11-02 01:34:32.000000000 +0100
+++ ./SSLBind.cpp       2007-11-12 00:30:43.000000000 +0100
@@ -22,6 +22,9 @@
 
 #include "SysInclude.h"
 #include "SysDep.h"
 #include "SvrDefines.h"
 #include "StrUtils.h"
 #include "BuffSock.h"
@@ -72,12 +75,13 @@
 
 
 
-static SYS_MUTEX *pSslMtxs;
+static SYS_MUTEX *pSslMtxs = NULL; /* [i_a] - without it, the app will crash 
when run without args and compiled in debug mode */
 
 
 
 static void BSslLockingCB(int iMode, int iType, const char *pszFile, int iLine)
 {
        if (iMode & CRYPTO_LOCK)
                SysLockMutex(pSslMtxs[iType], SYS_INFINITE_TIMEOUT);
        else
@@ -123,6 +127,7 @@
                        for (i--; i >= 0; i--)
                                SysCloseMutex(pSslMtxs[i]);
                        SysFree(pSslMtxs);
+                       pSslMtxs = NULL; /* [i_a] */
                        return ErrorPop();
                }
        }
@@ -158,6 +163,7 @@
        for (i = 0; i < iNumLocks; i++)
                SysCloseMutex(pSslMtxs[i]);
        SysFree(pSslMtxs);
+       pSslMtxs = NULL; /* [i_a] */
 }
 
 static int BSslHandleAsync(SslBindCtx *pCtx, int iCode, int iDefError, int 
iTimeo)
Only in .: SSLSupport.cpp
Only in .: SSLSupport.h
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/StrUtils.cpp ./StrUtils.cpp
--- ../../1original/xmail/StrUtils.cpp  2007-11-02 01:34:32.000000000 +0100
+++ ./StrUtils.cpp      2007-10-22 20:03:26.000000000 +0200
@@ -361,6 +361,12 @@
 
 char **StrGetTabLineStrings(const char *pszUsrLine)
 {
+       /* 
+          [i_a] if a line is empty or whitespace only, ignore it! 
+        */
+       if (!pszUsrLine || !*pszUsrLine)
+               return NULL;
+
        char **ppszStrings = StrTokenize(pszUsrLine, "\t");
 
        if (ppszStrings == NULL)
diff -u -EbwB --strip-trailing-cr -x resource.h -x '*.rc' -x '*.aps' -x 
VERSION.txt -x '*.ds*' -x '*.vcproj' -x '*.s*' -x '*.user' -x '*.ncb' -x '*.o' 
-x '*I_A*' -x '*.sh' ../../1original/xmail/SvrConfig.h ./SvrConfig.h
--- ../../1original/xmail/SvrConfig.h   2007-11-02 01:34:32.000000000 +0100
+++ ./SvrConfig.h       2007-11-14 22:08:56.000000000 +0100
Only in .: SysAssert.h
Only in .: SysDep.cpp



-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to