]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/bio/bio_lib.c
Fix BIO_get_new_index() to return an error when it is exhausted.
[thirdparty/openssl.git] / crypto / bio / bio_lib.c
index e4f72bcd1b8a140cd85f5cfc0f39d47bd28dc7d9..8bcf666e3c3290ea63815df0f21d95a2b048fcc7 100644 (file)
@@ -817,7 +817,7 @@ BIO *BIO_find_type(BIO *bio, int type)
         ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
         return NULL;
     }
-    mask = type & 0xff;
+    mask = type & BIO_TYPE_MASK;
     do {
         if (bio->method != NULL) {
             mt = bio->method->type;