Fix a compression bug
[openssl.git] / ssl / record / rec_layer_s3.c
index 37f7cd378bdba22187532370733d52563b90c64c..5aea4b31bdd6262327432c361a8ade2faef3110f 100644 (file)
@@ -791,7 +791,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
 
         maxcomplen = pipelens[j];
         if (s->compress != NULL)
 
         maxcomplen = pipelens[j];
         if (s->compress != NULL)
-            pipelens[j] += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
+            maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
 
         /* write the header */
         if (!WPACKET_put_bytes_u8(thispkt, rectype)
 
         /* write the header */
         if (!WPACKET_put_bytes_u8(thispkt, rectype)