提交 135d0189 编写于 作者: P Patrick McHardy

netfilter: nf_conntrack_sip: fix off-by-one in compact header parsing

In a string like "v:SIP/2.0..." it was checking for !isalpha('S') when it
meant to be inspecting the ':'.

Patch by Greg Alexander <greqcs@galexander.org>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
上级 dce766af
......@@ -376,7 +376,7 @@ int ct_sip_get_header(const struct nf_conn *ct, const char *dptr,
dptr += hdr->len;
else if (hdr->cname && limit - dptr >= hdr->clen + 1 &&
strnicmp(dptr, hdr->cname, hdr->clen) == 0 &&
!isalpha(*(dptr + hdr->clen + 1)))
!isalpha(*(dptr + hdr->clen)))
dptr += hdr->clen;
else
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册