diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-15 18:10:31 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-15 18:10:31 +0100 |
commit | 8cb86d947c3f580131337bddcbe0197584ed7a52 (patch) | |
tree | 045d39111f030882ea5d9a1a48a1cbf305abcfcd | |
parent | 3b85c7e05d33b4e8fb43da0442f676c70924adeb (diff) | |
download | NetworkManager-8cb86d947c3f580131337bddcbe0197584ed7a52.tar.gz |
clients: avoid crash in _complete_fcn_connection_master()
Found by coverity, but not a practical issue, because we
wouldn't actually call the function with text NULL.
-rw-r--r-- | clients/common/nm-meta-setting-desc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index ea339dd62e..142aab81dd 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -2449,7 +2449,7 @@ _complete_fcn_connection_master (ARGS_COMPLETE_FCN) expected_type = nm_setting_connection_get_slave_type (s_con); } - text_len = strlen (text); + text_len = text ? strlen (text) : 0; result = g_new (char *, (2 * len) + 1); for (i = 0, j = 0; i < len; i++) { |