The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] lib: vsprintf.c remove macros defining strict string functions
Date: Wed, 07 May 2008 12:24:17 -0700	[thread overview]
Message-ID: <1210188257.19279.43.camel@brick> (raw)
In-Reply-To: <1210188046.19279.42.camel@brick>


On Wed, 2008-05-07 at 12:20 -0700, Harvey Harrison wrote:
> On Thu, 2008-05-08 at 00:09 +0400, Alexey Dobriyan wrote:
> > On Wed, May 07, 2008 at 11:25:29AM -0700, Harvey Harrison wrote:
> > > Directly code the strict string conversion functions rather than using
> > > defining macros.  Pull out a small helper to check the strict conditions
> > > required at the end of a string (nul-terminated or newline).
> > 
> > > Add additional checks in strict_strtol and strict_strtoll for numeric
> > > overflow of the signed types.
> > 
> > C interer ranges are asymmetric.
> 
> Yes, and LLONG_MAX = -LLONG_MIN + 1...so it will reject string values
> of LLONG_MIN...easily fixed if we want it I guess.


Missed the braces above obviously....but the point stands.

Harvey


      reply	other threads:[~2008-05-07 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 18:25 [PATCH 2/2] lib: vsprintf.c remove macros defining strict string functions Harvey Harrison
2008-05-07 20:09 ` Alexey Dobriyan
2008-05-07 19:20   ` Harvey Harrison
2008-05-07 19:24     ` Harvey Harrison [this message]

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=1210188257.19279.43.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@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