This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementation of C11 Bounds-checking interfaces


On Wed, Oct 31, 2012 at 03:16:58PM +0100, Ulrich Bayer wrote:
> More information about the project is available at:
> 
> http://code.google.com/p/slibc/
> 
> 
> Of course, we welcome your feedback.

Some more notes on behavior/conformance:

freopen_s: It is not conformant to call fclose and then fopen_s.
freopen is required to return the argument passed to it on success,
not a new FILE pointer. I think wrapping freopen would work just fine
and would also handle the case where the filename argument is NULL.

gets_s: Very slow and does not perform the necessary locking to make
the whole operation atomic. You should just call fgets and then remove
the trailing newline if gets_s is supposed to behave like gets and do
that.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]