fix crash in SSL BLOB-Reading
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 4 Nov 2010 19:28:27 +0000 (20:28 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 6 Nov 2010 11:49:52 +0000 (12:49 +0100)
 - when diciding whether the read buffer contains more than the blob reader wants we had a wrong equation.

citadel/modules/crypto/serv_crypto.c

index 30309f896c29618446c108f62795b43b5a892491..9decb6907309f2ff4aca93cbe1ea270c66825a62 100644 (file)
@@ -604,7 +604,7 @@ int client_read_sslblob(StrBuf *Target, long bytes, int timeout)
                retval = client_read_sslbuffer(CCC->ReadBuf, timeout);
                if (retval >= 0) {
                        RemainRead = bytes - (StrLength (Target) - baselen);
-                       if (RemainRead > StrLength(CCC->ReadBuf))
+                       if (RemainRead < StrLength(CCC->ReadBuf))
                        {
                                StrBufAppendBufPlain(
                                        Target,