]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2843 in SNORT/snort3 from ~OSIRYI/snort3:appid_version_warning...
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 15 Apr 2021 16:40:50 +0000 (16:40 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 15 Apr 2021 16:40:50 +0000 (16:40 +0000)
Squashed commit of the following:

commit 1efe29874535e5825846136c83a71d4ee66eaa61
Author: Oleksandr Siryi <osiryi@cisco.com>
Date:   Thu Apr 15 18:53:38 2021 +0300

    appid: (style) Local variable 'version' shadows outer variable

src/network_inspectors/appid/appid_session.cc

index 5118053385f8ded3af947834b271aff30b81ad03..734168ec4ed505629c56260427f4535867a4164b 100644 (file)
@@ -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))