fix crash in SSL BLOB-Reading
[citadel.git] / 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,