libnm-util: do not call crypto_md5_hash() for empty passwords

It happens when one selected private key, but didn't provide the password yet
in nm-connection-editor.

(nm-connection-editor:11080): libnm-util-CRITICAL **: crypto_md5_hash: assertion `password_len > 0' failed
This commit is contained in:
Jiří Klimeš 2014-05-02 11:18:01 +02:00
parent 31cd3fe444
commit a9f5494d4d

View file

@ -406,6 +406,9 @@ make_des_key (const char *cipher,
return NULL;
}
if (password[0] == '\0')
return NULL;
key = g_malloc0 (digest_len + 1);
if (!crypto_md5_hash (salt,