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>
Thu, 4 Nov 2010 19:28:27 +0000 (20:28 +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 e962d7f01c772886ba03d584270eadf166888f11..e10cb79f0b489978622bed6d7f8edbe4bab08756 100644 (file)
@@ -603,7 +603,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,