From afcb72cf8d8b37fbbd47fd9f2ddf98e3b009ba2d Mon Sep 17 00:00:00 2001 From: "Russ Combs (rucombs)" Date: Thu, 15 Apr 2021 16:40:50 +0000 Subject: [PATCH] Merge pull request #2843 in SNORT/snort3 from ~OSIRYI/snort3:appid_version_warning to master Squashed commit of the following: commit 1efe29874535e5825846136c83a71d4ee66eaa61 Author: Oleksandr Siryi Date: Thu Apr 15 18:53:38 2021 +0300 appid: (style) Local variable 'version' shadows outer variable --- src/network_inspectors/appid/appid_session.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/network_inspectors/appid/appid_session.cc b/src/network_inspectors/appid/appid_session.cc index 511805338..734168ec4 100644 --- a/src/network_inspectors/appid/appid_session.cc +++ b/src/network_inspectors/appid/appid_session.cc @@ -573,20 +573,20 @@ void AppIdSession::examine_rtmp_metadata(AppidChangeBits& change_bits) hsession->client.get_id() <= APP_ID_NONE and (field = hsession->get_field(REQ_AGENT_FID))) { - char *version = nullptr; + char *agent_version = nullptr; HttpPatternMatchers& http_matchers = get_odp_ctxt().get_http_matchers(); http_matchers.identify_user_agent(field->c_str(), field->size(), service_id, - client_id, &version); + client_id, &agent_version); - hsession->set_client(client_id, change_bits, "User Agent", version); + hsession->set_client(client_id, change_bits, "User Agent", agent_version); // do not overwrite a previously-set service if ( api.service.get_id() <= APP_ID_NONE ) set_service_appid_data(service_id, change_bits); scan_flags &= ~SCAN_HTTP_USER_AGENT_FLAG; - snort_free(version); + snort_free(agent_version); } if (const char* url = hsession->get_cfield(MISC_URL_FID)) -- 2.47.3