mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
dce766af54
commit
135d01899b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue