aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/yahoo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/yahoo.c')
-rw-r--r--src/lib/protocols/yahoo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/protocols/yahoo.c b/src/lib/protocols/yahoo.c
index ceb9d48b6..bd7f3ef66 100644
--- a/src/lib/protocols/yahoo.c
+++ b/src/lib/protocols/yahoo.c
@@ -62,6 +62,9 @@ __forceinline static
#endif
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;
u_int16_t yahoo_len_parsed = 0;