diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-03-14 20:25:11 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-03-16 15:54:38 +0000 |
commit | 7a4a9b9b47d2fe9b90cee95d68d89faa24a118d4 (patch) | |
tree | 42425ff763f928e06c6fbaf6f8910c89eae38ac9 | |
parent | 7e49c161b76c687f5813e81305ca6697a397478a (diff) | |
download | klee-7a4a9b9b47d2fe9b90cee95d68d89faa24a118d4.tar.gz |
Fixed a bug in KLEE libc's implementation of strcmp: according to the C standard, characters should be compared as unsigned chars.
-rw-r--r-- | runtime/klee-libc/strcmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/klee-libc/strcmp.c b/runtime/klee-libc/strcmp.c index cdb002c7..e95df928 100644 --- a/runtime/klee-libc/strcmp.c +++ b/runtime/klee-libc/strcmp.c @@ -10,5 +10,5 @@ int strcmp(const char *a, const char *b) { while (*a && *a == *b) ++a, ++b; - return *a - *b; + return *(const unsigned char*)a - *(const unsigned char*)b; } |