This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: bug in times.c
Hi Petr,
On 03/11/2013 01:05 PM, Siddhesh Poyarekar wrote:
> On 11 March 2013 16:53, Petr Baudis <pasky@ucw.cz> 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.
Regards
Holger