mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 20:00:32 +01:00
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:
parent
31cd3fe444
commit
a9f5494d4d
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue