From 6d749a38f78b3333889bd69e09a084dfa3c4edaf Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 2 Feb 2015 10:29:34 +0100 Subject: [PATCH] make sure we try to decode uppercase hex --- lib/ykpiv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ykpiv.c b/lib/ykpiv.c index b46234e..ea927db 100644 --- a/lib/ykpiv.c +++ b/lib/ykpiv.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -465,7 +466,7 @@ ykpiv_rc ykpiv_hex_decode(const char *hex_in, size_t in_len, } *out_len = in_len / 2; for(i = 0; i < in_len; i++) { - char *ind_ptr = strchr(hex_translate, *hex_in++); + char *ind_ptr = strchr(hex_translate, tolower(*hex_in++)); int index = 0; if(ind_ptr) { index = ind_ptr - hex_translate;