aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/yahoo.c
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2020-03-12 18:13:30 +0100
committerGitHub <noreply@github.com>2020-03-12 18:13:30 +0100
commit70ee793ff3dac24af0d0526cc40ff3639fa3feed (patch)
tree98d9edf7d15895b694f4752615c5aee617df9945 /src/lib/protocols/yahoo.c
parent1e933e8b026f6f88f27d64ec2260013f38d268d0 (diff)
parent7806eb5f5b02fd78de1db20caeebc56088ebec3e (diff)
Merge pull request #856 from catenacyber/fuzzfix5
Fuzzfix5
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;