Skip to content

Commit 1c8d593

Browse files
authored
Merge pull request wolfSSL#9860 from anhu/for_length
Fix for loop exit condition.
2 parents 350706d + 9d3cc6e commit 1c8d593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ static int TLSX_ALPN_ParseAndSet(WOLFSSL *ssl, const byte *input, word16 length,
19101910
return BUFFER_ERROR;
19111911

19121912
/* validating length of entries before accepting */
1913-
for (s = input + offset; (s - input) < size; s += wlen) {
1913+
for (s = input + offset; (s - input) < length; s += wlen) {
19141914
wlen = *s++;
19151915
if (wlen == 0 || (s + wlen - input) > length)
19161916
return BUFFER_ERROR;

0 commit comments

Comments
 (0)