Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366600671.18069.140@driftwood>
Date: Sun, 21 Apr 2013 22:17:51 -0500
From: Rob Landley <rob@...dley.net>
To: musl@...ts.openwall.com
Cc: musl@...ts.openwall.com
Subject: Re: scanf requirements not met?

On 04/20/2013 11:51:20 AM, Rich Felker wrote:
> On Thu, Apr 04, 2013 at 09:52:55PM -0400, Rich Felker wrote:
> > Hi all,
> >
> > In consideration of adding the 'm' modifier for scanf and looking at
> > how it's supposed to handle malloc failure, I believe the current
> > implementation may be getting some things wrong. Seeing that it
> > defined malloc failure as a "conversion error":
> >
> >     If there is insufficient memory to allocate a buffer, the  
> function
> >     shall set errno to [ENOMEM] and a conversion error shall result.
> >
> > I noticed that this was not either of the "failures" defined for
> > scanf: input or matching. The text "conversion error" does not occur
> > elsewhere, but the ERRORS section does specify:
> >
> >     If any error occurs, EOF shall be returned, and errno shall be  
> set
> >     to indicate the error.
> 
> Searching again, I can no longer find the text "if any error" in the
> specification for scanf. It looks like TC1 has been applied to the
> html version of POSIX, and the text I had cited above, which conflicts
> with the requirements of ISO C, has been corrected such that an error
> return only happens if the error occurs before the first conversion.

Stomping the existing web copy of posix, without an obvious changelog,  
really doesn't fill me with happy thoughts.

I'm glad I downloed it before they did that. I'm not quite to the point  
of changing my links to point to the archive.org copy, but I do NOT  
understand why a 5 year gap does not merit susv7. (Posix 2008 was not  
posix 2001, so why is posix 2013 considered still posix 2008?)

Rob

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.