Andrew Cooper writes ("Re: [PATCH] xen/lib: Fix strcmp() and strncmp()"):
> On 27/07/2021 19:47, Jane Malalane wrote:
> > - register signed char __res;
> > + unsigned char *csu = (unsigned char *)cs;
> > + unsigned char *ctu = (unsigned char *)ct;
>
>
On 27/07/2021 19:47, Jane Malalane wrote:
> diff --git a/xen/lib/strcmp.c b/xen/lib/strcmp.c
> index 465f1c4191..f85c1e8741 100644
> --- a/xen/lib/strcmp.c
> +++ b/xen/lib/strcmp.c
> @@ -11,14 +11,16 @@
> */
> int (strcmp)(const char *cs, const char *ct)
> {
> - register signed char __res;
Jane Malalane writes ("Re: [PATCH] xen/lib: Fix strcmp() and strncmp()"):
> On 28/07/2021 11:42, Ian Jackson wrote:
> What are the practical effects of this bug ? AFAICT in the hypervisor
> code all the call sites simply test for zero/nonzero.
...
> This fix was
On 28/07/2021 11:42, Ian Jackson wrote:
[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
unless you have verified the sender and know the content is safe.
Jane Malalane writes ("[PATCH] xen/lib: Fix strcmp() and strncmp()"):
The C standard requires
Jane Malalane writes ("[PATCH] xen/lib: Fix strcmp() and strncmp()"):
> The C standard requires that each character be compared as unsigned
> char. Xen's current behaviour compares as signed char, which changes
> the answer when chars with a value greater than 0x7f are
The C standard requires that each character be compared as unsigned
char. Xen's current behaviour compares as signed char, which changes
the answer when chars with a value greater than 0x7f are used.
Suggested-by: Andrew Cooper
Signed-off-by: Jane Malalane
---
CC: Andrew Cooper
CC: George Dunla