Ugh, BIO_find_type() cannot be passed a NULL.
[openssl.git] / crypto / bio / bio_lib.c
index fa32df041e2d7c0dbb9f4eee58b0f39fb01b6ae9..381afc9b8e03a05d5e8b3459e5a3d9facc4b5055 100644 (file)
@@ -418,6 +418,7 @@ BIO *BIO_find_type(BIO *bio, int type)
        {
        int mt,mask;
 
        {
        int mt,mask;
 
+       if(!bio) return NULL;
        mask=type&0xff;
        do      {
                if (bio->method != NULL)
        mask=type&0xff;
        do      {
                if (bio->method != NULL)