From: Karel Zak <kzak@redhat.com>
To: Sami Kerola <kerolasa@iki.fi>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 08/13] col: check with strtol_or_err option argument
Date: Wed, 1 Jun 2011 10:12:10 +0200 [thread overview]
Message-ID: <20110601081210.GA24847@nb.net.home> (raw)
In-Reply-To: <1306270604-6154-9-git-send-email-kerolasa@iki.fi>
On Tue, May 24, 2011 at 10:56:39PM +0200, Sami Kerola wrote:
> case 'l': /* buffered line count */
> - if ((max_bufd_lines = atoi(optarg)) <= 0)
> - errx(EXIT_FAILURE, _("bad -l argument %s."), optarg);
> + tmplong = strtoul_or_err(optarg, _("bad -l argument"));
> + if ((INT_MAX / 2) < tmplong)
Why we need this magical (INT_MAX / 2) limit?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2011-06-01 8:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 20:56 [PATCH 00/13]: text-utils fixes Sami Kerola
2011-05-24 20:56 ` [PATCH 08/13] col: check with strtol_or_err option argument Sami Kerola
2011-06-01 8:12 ` Karel Zak [this message]
2011-05-24 20:56 ` [PATCH 09/13] colrm: gotos, long options and argument checking Sami Kerola
2011-06-01 8:13 ` Karel Zak
2011-05-24 20:56 ` [PATCH 10/13] docs: colrm manual update Sami Kerola
[not found] ` <20110601081046.GE25562@nb.net.home>
2011-06-05 18:47 ` Fwd: [PATCH 00/13]: text-utils fixes Sami Kerola
2011-06-08 9:17 ` Karel Zak
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=20110601081210.GA24847@nb.net.home \
--to=kzak@redhat.com \
--cc=kerolasa@iki.fi \
--cc=util-linux@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