]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Polish: zero-initialize WCCPv2 security object
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 20 Jan 2013 04:37:30 +0000 (21:37 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 20 Jan 2013 04:37:30 +0000 (21:37 -0700)
Most of the objects fields are initialized later individually and the
rest SHOULD not matter. But it is better to be safe than sorry in this
area.

 Detected by Coverity Scan. Issue 740505.

src/wccp2.cc

index 5267a7726dfb73b742afca8a018de9ec800b2798..8861dd8c993c4225f2436d390407a8d7386a4fc5 100644 (file)
@@ -681,8 +681,6 @@ wccp2Init(void)
 
     struct wccp2_router_list_t *router_list_ptr;
 
-    struct wccp2_security_md5_t wccp2_security_md5;
-
     debugs(80, 5, "wccp2Init: Called");
 
     if (wccp2_connected == 1)
@@ -702,6 +700,9 @@ wccp2Init(void)
         return;
     }
 
+    struct wccp2_security_md5_t wccp2_security_md5;
+    memset(&wccp2_security_md5, 0, sizeof(wccp2_security_md5));
+
     /* Initialise the list of services */
     wccp2InitServices();