From d5b1698c43784913d111775441071eebd82d53bd Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Tue, 20 Jun 2017 09:27:24 +1000 Subject: [PATCH] Fix for Nginx - return specific error when at end of file --- src/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 5b93ed2e3..35a305936 100755 --- a/src/ssl.c +++ b/src/ssl.c @@ -22470,7 +22470,7 @@ void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl) XFSEEK(bp->file, i, SEEK_SET); /* check calulated length */ - if (l - i <= 0) + if (l - i < 0) return NULL; pem = (unsigned char*)XMALLOC(l - i, 0, DYNAMIC_TYPE_TMP_BUFFER);