]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/crypto/serv_crypto.c
fix crash in SSL BLOB-Reading
[citadel.git] / 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,