Read up to INT_MAX when calling legacy BIO_read() implementations
[openssl.git] / crypto / bio / bio_meth.c
index 7b4c340cdf34266ec6e28310f871fc9cc28d8111..daffc541a311fd2f8f9022a929abc7508c6e2c0c 100644 (file)
@@ -112,7 +112,7 @@ int bread_conv(BIO *bio, char *out, size_t outl, size_t *read)
     int ret;
 
     if (outl > INT_MAX)
-        return 0;
+        outl = INT_MAX;
 
     ret = bio->method->bread_old(bio, out, (int)outl);