netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Leblond <eric@regit.org>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [nft PATCH] scanner: fix reading of really long line
Date: Mon, 1 Dec 2014 12:55:34 +0100	[thread overview]
Message-ID: <20141201115534.GA6170@salvia> (raw)
In-Reply-To: <1417278278-30206-1-git-send-email-eric@regit.org>

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?

If so, I think it's better to spot an error via YY_FATAL_ERROR to
indicate that the line is too long to the user.

  reply	other threads:[~2014-12-01 11:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 16:24 [nft PATCH] scanner: fix reading of really long line Eric Leblond
2014-12-01 11:55 ` Pablo Neira Ayuso [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-01 13:46 Eric Leblond
2014-12-03 11:53 ` 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=20141201115534.GA6170@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).