Skip to content

Commit da2f27e

Browse files
chleroyummakynes
authored andcommitted
netfilter: nf_conntrack_sip: fix wrong memory initialisation
In commit 82de0be ("netfilter: Add helper array register/unregister functions"), struct nf_conntrack_helper sip[MAX_PORTS][4] was changed to sip[MAX_PORTS * 4], so the memory init should have been changed to memset(&sip[4 * i], 0, 4 * sizeof(sip[i])); But as the sip[] table is allocated in the BSS, it is already set to 0 Fixes: 82de0be ("netfilter: Add helper array register/unregister functions") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 29e0922 commit da2f27e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/netfilter/nf_conntrack_sip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,8 +1628,6 @@ static int __init nf_conntrack_sip_init(void)
16281628
ports[ports_c++] = SIP_PORT;
16291629

16301630
for (i = 0; i < ports_c; i++) {
1631-
memset(&sip[i], 0, sizeof(sip[i]));
1632-
16331631
nf_ct_helper_init(&sip[4 * i], AF_INET, IPPROTO_UDP, "sip",
16341632
SIP_PORT, ports[i], i, sip_exp_policy,
16351633
SIP_EXPECT_MAX,

0 commit comments

Comments
 (0)