
kaber at trash
Aug 14, 2007, 9:40 AM
Post #1 of 1
(546 views)
Permalink
|
|
[NETFILTER 02/04]: nf_conntrack_sip: check sname != NULL before calling strncmp
|
|
[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 [at] trash> --- commit c58af8c25d20e59644356f78e055eeba9edb8aae tree c7c95d0ba93d86f6ec33dc2ae12e532dc1ce77ab parent 4cbeda3b69e71c535ea820f5a94f4232598e3eea author Patrick McHardy <kaber [at] trash> Tue, 14 Aug 2007 18:37:01 +0200 committer Patrick McHardy <kaber [at] trash> Tue, 14 Aug 2007 18:37:01 +0200 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 1276a44..5cc9636 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; }
|