diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-05-02 11:18:01 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-05-12 10:46:41 +0200 |
commit | a9f5494d4d7d1fb6071730324ee99b5c77fc0fa0 (patch) | |
tree | cefa288862a196c00b8382a1faa03690c5f142d3 /libnm-util/crypto.c | |
parent | 31cd3fe444391dc669988634cf2b14329df3e2f0 (diff) | |
download | NetworkManager-a9f5494d4d7d1fb6071730324ee99b5c77fc0fa0.tar.gz |
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
Diffstat (limited to 'libnm-util/crypto.c')
-rw-r--r-- | libnm-util/crypto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c index 6097b13dfc..c2a93b3bef 100644 --- a/libnm-util/crypto.c +++ b/libnm-util/crypto.c @@ -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, |