[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasec

From: Pavel Roskin
Subject: Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp
Date: Wed, 21 Jan 2009 12:30:57 -0500

On Wed, 2009-01-21 at 13:08 +0100, Daniel Mierswa wrote:
> Hi list,
> during testing I found that the UUID is checked case-dependend in
> search.c, which is probably not wanted (I hope).
> Also the grub_strncasecmp function returned (int) *s1 - (int) *s2 which
> is wrong if you compare it to the C library strncasecmp.

I agree, that's definitely wrong.  Good catch!

> I fixed that and used the same algorithm which is used in grub_strncmp
> (Taking a grub_size_t instead of int and checked the decremented value
> in the loop). I also added strcasecmp for consistency reasons which is
> used by search.c now.
> I'd appreciate your your replies.

The patch looks good to me.  I would split changes to commands/search.c
into a separate commit.

Please provide ChangeLog entries for the patches.

Pavel Roskin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]