mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 01:20:50 +02:00
Merge pull request #9860 from anhu/for_length
Fix for loop exit condition.
This commit is contained in:
@@ -1910,7 +1910,7 @@ static int TLSX_ALPN_ParseAndSet(WOLFSSL *ssl, const byte *input, word16 length,
|
||||
return BUFFER_ERROR;
|
||||
|
||||
/* validating length of entries before accepting */
|
||||
for (s = input + offset; (s - input) < size; s += wlen) {
|
||||
for (s = input + offset; (s - input) < length; s += wlen) {
|
||||
wlen = *s++;
|
||||
if (wlen == 0 || (s + wlen - input) > length)
|
||||
return BUFFER_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user