1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Fixed array access out of bounds bug in add_cert()

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@234 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
olereinhardt 2014-09-24 10:21:23 +00:00
parent ce488f9180
commit 29e7d3554d

View File

@ -342,7 +342,7 @@ int add_cert(SSL_CTX *ssl_ctx, const uint8_t *buf, int len)
X509_CTX *cert = NULL;
int offset;
while (ssl_ctx->certs[i].buf && i < CONFIG_SSL_MAX_CERTS)
while (i < CONFIG_SSL_MAX_CERTS && ssl_ctx->certs[i].buf)
i++;
if (i == CONFIG_SSL_MAX_CERTS) /* too many certs */