It's perfectly fine to give a NULL pointer if the length has explicitly
been specified as zero.
{
char buf[9];
- assert(data != NULL);
-
if (len != 8)
throw rdr::Exception("bad obfuscated password length");
+ assert(data != NULL);
+
deskey(d3desObfuscationKey, DE1);
des((uint8_t*)data, (uint8_t*)buf);
buf[8] = 0;
bool hexToBin(const char* in, size_t inlen,
uint8_t* out, size_t outlen) {
- assert(in);
- assert(out);
+ assert(in || inlen == 0);
+ assert(out || outlen == 0);
if (inlen & 1)
return false;