return error properly on hex decode

This commit is contained in:
Klas Lindfors
2015-02-02 10:17:45 +01:00
parent 60c8b757ae
commit 22d04fc1c8
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -466,6 +466,8 @@ ykpiv_rc ykpiv_hex_decode(const char *hex_in, size_t in_len,
int index = 0;
if(ind_ptr) {
index = ind_ptr - hex_translate;
} else {
return YKPIV_PARSE_ERROR;
}
if(first) {
*hex_out = index << 4;