Fix for Nginx - return specific error when at end of file

This commit is contained in:
Sean Parkinson
2017-06-20 09:27:24 +10:00
parent 2a688bf905
commit d5b1698c43

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