Fix CID 1195075

This commit is contained in:
jvoisin 2014-05-07 13:24:59 +02:00
parent 03cff1625a
commit fdeef9c07f

View file

@ -14,7 +14,7 @@ static int bitnum(int bit) {
/* TODO: do it more beautiful with structs and not spaguetis */
/* TODO: find a better method name */
R_API int r_hash_calculate(RHash *ctx, int algobit, const ut8 *buf, int len) {
if (len<0)
if (len <= 0)
return 0;
if (algobit & R_HASH_MD4) {
r_hash_do_md4 (ctx, buf, len);