mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-01 03:26:58 +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:
@ -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 */
|
||||
|
Reference in New Issue
Block a user