[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Tue Aug 22 14:10:27 UTC 2017
The branch master has been updated
via 6ac589081b53a62bff5f0abe62c1c109c419c7a0 (commit)
via 196f5c4b0dc3c640dfed67b007192db81d616a92 (commit)
from 176db6dc51ec0a972bfa8836cfdab8f6767c978a (commit)
- Log -----------------------------------------------------------------
commit 6ac589081b53a62bff5f0abe62c1c109c419c7a0
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Aug 22 15:53:39 2017 +0200
Don't try to compare the ctype functions on values > 127
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 at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4219)
commit 196f5c4b0dc3c640dfed67b007192db81d616a92
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Aug 22 15:51:35 2017 +0200
Don't try to test ctype functions for values < 0 or > 255
Values that aren't representable as unsigned give undefined results.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4219)
-----------------------------------------------------------------------
Summary of changes:
test/ctype_internal_test.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/test/ctype_internal_test.c b/test/ctype_internal_test.c
index 514db6b..6b66cfb 100644
--- a/test/ctype_internal_test.c
+++ b/test/ctype_internal_test.c
@@ -42,11 +42,6 @@ static int test_ctype_chars(int n)
&& TEST_int_eq(isxdigit(n) != 0, ossl_isxdigit(n) != 0);
}
-static int test_ctype_negative(int n)
-{
- return test_ctype_chars(-n);
-}
-
static struct {
int u;
int l;
@@ -58,10 +53,7 @@ static struct {
{ '%', '%' },
{ '~', '~' },
{ 0, 0 },
- { EOF, EOF },
- { 333, 333 },
- { -333, -333 },
- { -128, -128 }
+ { EOF, EOF }
};
static int test_ctype_toupper(int n)
@@ -78,8 +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_negative, 128);
+ 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;
More information about the openssl-commits
mailing list