fix on TLSX_SNI_GetFromBuffer - > should be >= so extensions of length 0 get inside the while.

added test to cover case.
This commit is contained in:
Moisés Guimarães
2014-06-10 16:56:45 -03:00
parent ba36c24fc1
commit 9c905b6519
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -997,7 +997,7 @@ int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz,
if (helloSz < offset + len16)
return BUFFER_ERROR;
while (len16 > OPAQUE16_LEN + OPAQUE16_LEN) {
while (len16 >= OPAQUE16_LEN + OPAQUE16_LEN) {
word16 extType;
word16 extLen;