summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-08-14 13:13:54 -0700
committerDavid S. Miller <davem@davemloft.net>2007-08-14 13:13:54 -0700
commit465f90a486cd724d364167747e8b8b9f806fa91a (patch)
treee78fa392a9f983aa551853546a26a7ba3d2a15e5
parent35019539d71bacd98de318c34728c97b1b505b49 (diff)
downloadblackbird-op-linux-465f90a486cd724d364167747e8b8b9f806fa91a.tar.gz
blackbird-op-linux-465f90a486cd724d364167747e8b8b9f806fa91a.zip
[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>
-rw-r--r--net/netfilter/nf_conntrack_sip.c3
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,
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;
}
OpenPOWER on IntegriCloud