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:
parent
ce488f9180
commit
29e7d3554d
@ -342,7 +342,7 @@ int add_cert(SSL_CTX *ssl_ctx, const uint8_t *buf, int len)
|
|||||||
X509_CTX *cert = NULL;
|
X509_CTX *cert = NULL;
|
||||||
int offset;
|
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++;
|
i++;
|
||||||
|
|
||||||
if (i == CONFIG_SSL_MAX_CERTS) /* too many certs */
|
if (i == CONFIG_SSL_MAX_CERTS) /* too many certs */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user