From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: On grub_strchr implementation
Date: Sun, 1 Nov 2009 22:58:09 +0100 [thread overview]
Message-ID: <20091101215809.GA10489@thorin> (raw)
In-Reply-To: <d019d53c0911011054w24c3b28au8ab2e54fc85e28c2@mail.gmail.com>
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."
next prev parent reply other threads:[~2009-11-01 21:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 18:54 On grub_strchr implementation BVK
2009-11-01 21:58 ` Robert Millan [this message]
2009-11-02 0:51 ` BVK
2009-11-02 5:55 ` BVK
2009-11-02 13:47 ` Robert Millan
2009-11-02 14:12 ` BVK
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091101215809.GA10489@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.