Don't copy from a nonexistent next. Coverity ID 47.
authorBen Laurie <ben@openssl.org>
Thu, 5 Apr 2007 17:23:51 +0000 (17:23 +0000)
committerBen Laurie <ben@openssl.org>
Thu, 5 Apr 2007 17:23:51 +0000 (17:23 +0000)
crypto/evp/bio_md.c

index f4c0a72..231b56b 100644 (file)
@@ -157,8 +157,11 @@ static int md_write(BIO *b, const char *in, int inl)
                                (unsigned int)ret);
                        }
                }
-       BIO_clear_retry_flags(b);
-       BIO_copy_next_retry(b);
+       if(b->next_bio != NULL)
+               {
+               BIO_clear_retry_flags(b);
+               BIO_copy_next_retry(b);
+               }
        return(ret);
        }