On Thu, Sep 01, 2016 at 06:58:29PM +0800, fgao@xxxxxxxxxx wrote: > From: Gao Feng <fgao@xxxxxxxxxx> > > 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. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html