Merge pull request #987 from SparkiDev/nginx_fix

Fix for Nginx - return specific error when at end of file
This commit is contained in:
toddouska
2017-06-20 14:28:34 -07:00
committed by GitHub

View File

@@ -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);