Fix buffer overread in yahoo
This commit is contained in:
@@ -62,6 +62,9 @@ __forceinline static
|
|||||||
#endif
|
#endif
|
||||||
u_int8_t check_ymsg(const u_int8_t * payload, u_int16_t payload_packet_len)
|
u_int8_t check_ymsg(const u_int8_t * payload, u_int16_t payload_packet_len)
|
||||||
{
|
{
|
||||||
|
if (payload_packet_len < sizeof(struct ndpi_yahoo_header)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
const struct ndpi_yahoo_header *yahoo = (struct ndpi_yahoo_header *) payload;
|
const struct ndpi_yahoo_header *yahoo = (struct ndpi_yahoo_header *) payload;
|
||||||
|
|
||||||
u_int16_t yahoo_len_parsed = 0;
|
u_int16_t yahoo_len_parsed = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user