Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set IPv6 address scope ID (fr_ip_addr_t.scope) to zero in ip_ptonx. This avoids possible random %{getclient:<ipaddr>.foo} IPv6 client lookup failures due to the scope ID being uninitialized, but then used in fr_ipaddr_cmp, invoked by client_find, used in xlat_getclient. The issue was found during a Coverity scan of 3.0.1 and reported as follows: freeradius-server-3.0.1/src/main/mainconfig.c:374: var_decl: Declaring variable "ip" without initializer. freeradius-server-3.0.1/src/main/mainconfig.c:394: uninit_use_in_call: Using uninitialized value "ip". Field "ip.scope" is uninitialized when calling "client_find(RADCLIENT_LIST const *, fr_ipaddr_t const *, int)". freeradius-server-3.0.1/src/main/client.c:466:3: read_parm: Reading a parameter value.
- Loading branch information