The Set() method returns false if the input is no hex number,
so simply use that.
}
else if (likely(value.size() == 32))
{
}
else if (likely(value.size() == 32))
{
- if (likely(value.find_first_not_of("0123456789abcdefABCDEF") == string::npos))
- return MD5SumValue(value);
+ MD5SumValue sumvalue;
+ if (sumvalue.Set(value))
+ return sumvalue;
+
_error->Error("Malformed Description-md5 line; includes invalid character '%s'", value.c_str());
return MD5SumValue();
}
_error->Error("Malformed Description-md5 line; includes invalid character '%s'", value.c_str());
return MD5SumValue();
}