app-layer-ssl: don't decode empty extensions

pull/3478/head
Mats Klepsland 7 years ago
parent 4d38d0844b
commit eba0d04171

@ -1122,6 +1122,10 @@ static inline int TLSDecodeHSHelloExtensions(SSLState *ssl_state,
if (!(HAS_SPACE(ext_len)))
goto invalid_length;
/* Don't decode empty extensions */
if (ext_len == 0)
goto next;
parsed = input - initial_input;
switch (ext_type) {
@ -1208,6 +1212,7 @@ static inline int TLSDecodeHSHelloExtensions(SSLState *ssl_state,
}
}
next:
processed_len += ext_len + 4;
}

Loading…
Cancel
Save