diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/evp/evptest.c | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/src/regress/lib/libcrypto/evp/evptest.c b/src/regress/lib/libcrypto/evp/evptest.c index a71c1fb55a..bd5da475f1 100644 --- a/src/regress/lib/libcrypto/evp/evptest.c +++ b/src/regress/lib/libcrypto/evp/evptest.c | |||
| @@ -81,10 +81,14 @@ convert(unsigned char *s) | |||
| 81 | unsigned int n; | 81 | unsigned int n; | 
| 82 | 82 | ||
| 83 | if (!s[1]) { | 83 | if (!s[1]) { | 
| 84 | fprintf(stderr, "Odd number of hex digits!"); | 84 | fprintf(stderr, "Odd number of hex digits!\n"); | 
| 85 | exit(4); | 85 | exit(4); | 
| 86 | } | 86 | } | 
| 87 | sscanf((char *)s, "%2x",&n); | 87 | if (sscanf((char *)s, "%2x", &n) != 1) { | 
| 88 | fprintf(stderr, "Invalid hex value at %s\n", s); | ||
| 89 | exit(4); | ||
| 90 | } | ||
| 91 | |||
| 88 | *d = (unsigned char)n; | 92 | *d = (unsigned char)n; | 
| 89 | } | 93 | } | 
| 90 | return s - d; | 94 | return s - d; | 
