Fix incomplete BIO_dup_state() error check
[openssl.git] / crypto / bio / bio_lib.c
index 4708b984fa5d27ca1d27875cf689becfb326c00b..2848d55934d42a63115c0db6e2c00f303a86fe17 100644 (file)
@@ -886,7 +886,7 @@ BIO *BIO_dup_chain(BIO *in)
         /* This will let SSL_s_sock() work with stdin/stdout */
         new_bio->num = bio->num;
 
-        if (!BIO_dup_state(bio, (char *)new_bio)) {
+        if (BIO_dup_state(bio, (char *)new_bio) <= 0) {
             BIO_free(new_bio);
             goto err;
         }