From: Patrick McHardy Date: Tue, 14 Aug 2007 20:13:54 +0000 (-0700) Subject: [NETFILTER]: nf_conntrack_sip: check sname != NULL before calling strncmp X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=465f90a486cd724d364167747e8b8b9f806fa91a;p=linux-beck.git [NETFILTER]: nf_conntrack_sip: check sname != NULL before calling strncmp The check got lost during the conversion to nf_conntrack. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 1276a442f10c..5cc9636e46e9 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -330,7 +330,8 @@ int ct_sip_get_info(struct nf_conn *ct, while (dptr <= limit) { if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && - (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { + (hnfo->sname == NULL || + strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { dptr++; continue; }