diff options
Diffstat (limited to 'src/lib/crypto/builtin/des/destest.c')
| -rw-r--r-- | src/lib/crypto/builtin/des/destest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/crypto/builtin/des/destest.c b/src/lib/crypto/builtin/des/destest.c index 6eeb070d867f..dd2f68ec4032 100644 --- a/src/lib/crypto/builtin/des/destest.c +++ b/src/lib/crypto/builtin/des/destest.c @@ -52,6 +52,7 @@ /* Test a DES implementation against known inputs & outputs. */ #include "des_int.h" +#include <ctype.h> #include <stdio.h> void convert (char *, unsigned char []); @@ -160,7 +161,7 @@ convert(text, cblock) { register int i; for (i = 0; i < 8; i++) { - if (text[i*2] < 0 || text[i*2] >= 128) + if (!isascii((unsigned char)text[i * 2])) abort (); if (value[(int) text[i*2]] == -1 || value[(int) text[i*2+1]] == -1) { printf("Bad value byte %d in %s\n", i, text); |
