Skip to content

Commit

Permalink
[NETFILTER]: nf_conntrack_sip: check sname != NULL before calling str…
Browse files Browse the repository at this point in the history
…ncmp

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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 14, 2007
1 parent 3501953 commit 465f90a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 465f90a

Please sign in to comment.