[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On grub_strchr implementation
From: |
Robert Millan |
Subject: |
Re: On grub_strchr implementation |
Date: |
Sun, 1 Nov 2009 22:58:09 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Nov 02, 2009 at 12:24:33AM +0530, BVK wrote:
> hi,
>
>
> As per http://www.opengroup.org/onlinepubs/009695399/functions/strchr.html
> strchr method should consider '\0' as part of the string, which means,
> strchr should return '\0' character position when it is passed as the
> character to look for.
>
> I believe, grub_strchr is intended to mimic standard strchr semantics,
> but its implementation doesn't confrom the above requirement. Same
> goes for grub_strrchr function too. Attached is the patch to fix both
> of these.
Thanks.
But you also added a check for NULL dereference. Is that also required by
the standard?
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."