mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 03:40:11 +01:00
libnm-util: fix possible crash passing in NULL secret flags
This commit is contained in:
parent
9c2cce5ac9
commit
487cd8a301
1 changed files with 2 additions and 1 deletions
|
|
@ -377,7 +377,8 @@ get_secret_flags (NMSetting *setting,
|
|||
errno = 0;
|
||||
tmp = strtoul ((const char *) val, NULL, 10);
|
||||
if ((errno == 0) && (tmp <= NM_SETTING_SECRET_FLAGS_ALL)) {
|
||||
*out_flags = (guint32) tmp;
|
||||
if (out_flags)
|
||||
*out_flags = (guint32) tmp;
|
||||
success = TRUE;
|
||||
} else {
|
||||
g_set_error (error,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue