From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Leblond <eric@regit.org>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>,
Patrick McHardy <kaber@trash.net>
Subject: Re: [nft PATCH] scanner: fix reading of really long line
Date: Wed, 3 Dec 2014 12:53:30 +0100 [thread overview]
Message-ID: <20141203115330.GA12030@salvia> (raw)
In-Reply-To: <E1XvRIr-00046W-Nj@ks28632.kimsufi.com>
On Mon, Dec 01, 2014 at 02:46:04PM +0100, Eric Leblond wrote:
> Hello,
> Le 1 déc. 2014 12:55, Pablo Neira Ayuso <pablo@netfilter.org> a écrit :
> >
> > On Sat, Nov 29, 2014 at 05:24:38PM +0100, Eric Leblond wrote:
> > > Current code is causing a failure in adding a set containing
> > > a really long list of elements. The failure occurs as soon as
> > > the line is longer than flex read buffer.
> > >
> > > When a line is longer than scanner buffer size, the code in YY_INPUT
> > > forces a rewind to the beginning of the string because it does not
> > > find a end of line. The result is that the string is never parsed.
> > >
> > > This patch updates the code by rewinding till we found a space.
> >
> > But the part that didn't fit in will be ignore, right? So the user
> > will lose some elements in the set?
>
> This is not the case as there is a fseek below to rewind at the correct position. So next read get the data from the correct point.
OK. Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-12-03 11:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 13:46 [nft PATCH] scanner: fix reading of really long line Eric Leblond
2014-12-03 11:53 ` Pablo Neira Ayuso [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-29 16:24 Eric Leblond
2014-12-01 11:55 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141203115330.GA12030@salvia \
--to=pablo@netfilter.org \
--cc=eric@regit.org \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).