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." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel