diff options
author | Patrick McHardy <kaber@trash.net> | 2007-08-14 16:13:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-08-14 16:13:54 -0400 |
commit | 465f90a486cd724d364167747e8b8b9f806fa91a (patch) | |
tree | e78fa392a9f983aa551853546a26a7ba3d2a15e5 /net/netfilter | |
parent | 35019539d71bacd98de318c34728c97b1b505b49 (diff) |
[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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, | |||
330 | 330 | ||
331 | while (dptr <= limit) { | 331 | while (dptr <= limit) { |
332 | if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && | 332 | if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && |
333 | (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { | 333 | (hnfo->sname == NULL || |
334 | strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { | ||
334 | dptr++; | 335 | dptr++; |
335 | continue; | 336 | continue; |
336 | } | 337 | } |