Don't try to compare the ctype functions on values > 127
authorRichard Levitte <levitte@openssl.org>
Tue, 22 Aug 2017 13:53:39 +0000 (15:53 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 22 Aug 2017 14:10:04 +0000 (16:10 +0200)
Our internal replacement functions return 0 for those values.
However, depending on locale, the C RTL functions may return 1.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4219)

test/ctype_internal_test.c

index 15d01e76bb77f13f821c3920786876f36655d4f6..6b66cfbaa0a0e4d25324c002cb4ae164a696ce43 100644 (file)
@@ -70,7 +70,7 @@ static int test_ctype_tolower(int n)
 
 int setup_tests(void)
 {
-    ADD_ALL_TESTS(test_ctype_chars, 256);
+    ADD_ALL_TESTS(test_ctype_chars, 128);
     ADD_ALL_TESTS(test_ctype_toupper, OSSL_NELEM(case_change));
     ADD_ALL_TESTS(test_ctype_tolower, OSSL_NELEM(case_change));
     return 1;