diff -r e59a989d890d -r 060a8cda7f62 libidav/resource.c --- a/libidav/resource.c Thu Mar 28 11:19:13 2019 +0100 +++ b/libidav/resource.c Thu Mar 28 11:54:27 2019 +0100 @@ -855,7 +855,7 @@ if(res_hash) { size_t len = 0; char *dec_hash = aes_decrypt(res_hash, &len, key); - char *hex_hash = util_hexstr((unsigned char*)dec_hash, 32); + char *hex_hash = util_hexstr((unsigned char*)dec_hash, len); if(strcmp(hash, hex_hash)) { verify_failed = 1; }