From 8f8052735cbd1f5561ba6069c4359f1f9f50e2c1 Mon Sep 17 00:00:00 2001 From: Martin Natano Date: Fri, 28 Aug 2015 14:49:51 +0200 Subject: Make sure packet->user_agent_line.ptr is up to date before using it. Otherwise we might dereference a stale pointer. --- src/lib/protocols/steam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/protocols/steam.c b/src/lib/protocols/steam.c index fe7b9d161..7ed0eae29 100644 --- a/src/lib/protocols/steam.c +++ b/src/lib/protocols/steam.c @@ -34,6 +34,7 @@ static void ndpi_int_steam_add_connection(struct ndpi_detection_module_struct *n static void ndpi_check_steam_http(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; + NDPI_PARSE_PACKET_LINE_INFO(ndpi_struct, flow, packet); if (packet->user_agent_line.ptr != NULL && packet->user_agent_line.len >= 23 && memcmp(packet->user_agent_line.ptr, "Valve/Steam HTTP Client", 23) == 0) { -- cgit v1.2.3