summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-09-01 18:58:29 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-09-07 10:37:59 +0200
commit723eb299de62ce75dbd31e7ee25d45887c32a602 (patch)
tree9a59101dd3f37fd34f6164b777a02143740ed245 /firmware
parentf0608ceaa79d99d24e97517f9a9a0fed2b9698b4 (diff)
netfilter: ftp: Remove the useless dlen==0 condition check in find_pattern
The caller function "help" has already make sure the datalen could not be zero before invoke find_pattern as a parameter by the following codes if (dataoff >= skb->len) { pr_debug("ftp: dataoff(%u) >= skblen(%u)\n", dataoff, skb->len); return NF_ACCEPT; } datalen = skb->len - dataoff; And the latter codes "ends_in_nl = (fb_ptr[datalen - 1] == '\n');" use datalen directly without checking if it is zero. So it is unneccessary to check it in find_pattern too. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions