From: Andrew Cooper Date: Sat, 11 May 2019 18:20:34 +0000 (+0100) Subject: libc: Fix strcmp() ABI violations X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b18478cb6b8f855082a6c5bfbccb4dd29ac1d5df;p=xtf.git libc: Fix strcmp() ABI violations The C standard specifies that strcmp() interprets the provided strings as unsigned char, rather than signed. This affects the result when used on strings with the high bit set. Signed-off-by: Andrew Cooper --- diff --git a/common/libc/string.c b/common/libc/string.c index 967f2fa..5c25e27 100644 --- a/common/libc/string.c +++ b/common/libc/string.c @@ -46,7 +46,7 @@ char *(strncpy)(char *dst, const char *src, size_t n) int (strcmp)(const char *_s1, const char *_s2) { - char s1, s2; + unsigned char s1, s2; do { s1 = *_s1++;