From ab2d91bd6b9085b1e406d6cac68c3f6cfdc4522f Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Thu, 5 Apr 2007 17:23:51 +0000 Subject: [PATCH] Don't copy from a nonexistent next. Coverity ID 47. --- crypto/evp/bio_md.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c index f4c0a72981..231b56b65d 100644 --- a/crypto/evp/bio_md.c +++ b/crypto/evp/bio_md.c @@ -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); } -- 2.34.1