X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fctype.c;h=813be25a074121df57e357d44d2c48719a02504d;hb=8f57662771356882561b98d6add06a16dc479f9b;hp=588c6dac3cc2c4ac390db55864b00607ba8eecf7;hpb=932c0df29b7a5a2902c52e2f536b5b83392e2d42;p=openssl.git diff --git a/crypto/ctype.c b/crypto/ctype.c index 588c6dac3c..813be25a07 100644 --- a/crypto/ctype.c +++ b/crypto/ctype.c @@ -8,6 +8,7 @@ */ #include +#include #include "internal/ctype.h" #include "openssl/ebcdic.h" @@ -225,7 +226,7 @@ static const unsigned short ctype_char_map[128] = { #ifdef CHARSET_EBCDIC int ossl_toascii(int c) { - if (c < -128 || c > 256) + if (c < -128 || c > 256 || c == EOF) return c; /* * Adjust negatively signed characters. @@ -240,7 +241,7 @@ int ossl_toascii(int c) int ossl_fromascii(int c) { - if (c < -128 || c > 256) + if (c < -128 || c > 256 || c == EOF) return c; if (c < 0) c += 256;