[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>
This commit is contained in:
Patrick McHardy 2007-08-14 13:13:54 -07:00 коммит произвёл David S. Miller
Родитель 35019539d7
Коммит 465f90a486
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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;
}