This is the mail archive of the
mailing list for the glibc project.
[COMMITTED] Re: bug in times.c
On Wed, Mar 13, 2013 at 01:11:57PM +0100, Holger Brunck wrote:
> On 03/11/2013 01:05 PM, Siddhesh Poyarekar wrote:
> > On 11 March 2013 16:53, Petr Baudis <email@example.com> wrote:
> >> - /* If we come here the memory is valid and the kernel did not
> >> + /* If we come here the memory is valid (or BUF is NULL, which is
> >> + * a valid condition for the kernel syscall) and the kernel did not
> >> return an EFAULT error. Return the value given by the kernel. */
> > Please also fix the comment above it which says:
> > "We crash applications which pass in an invalid BUF pointer."
> > to:
> > "We crash applications which pass in an invalid non-NULL BUF
> > pointer. Linux allows BUF to be NULL."
> > The touch() is deliberate to ensure that we don't mistake an EFAULT
> > for a valid return value. However, the kernel will never send us an
> > EFAULT if buffer is NULL, so it is safe to bypass it. The change
> > looks OK to me with the above modification to the comment.
> do you send a patch for this or should I? Makes no difference for me, just let
> me know.
I'm sorry for the delay, I have committed this now as a fairly
obvious change. 58a1335e76a553e1cf4edeebc27f16fc9b53d6e6
Petr "Pasky" Baudis