Commit a7087b1f authored by Thomas Haller's avatar Thomas Haller

core: avoid dereferencing NULL in nm_utils_resolve_conf_parse()

Found by coverity.

Fixes: 8f1ef161
parent fbc60082
......@@ -1960,8 +1960,7 @@ nm_utils_resolve_conf_parse (int addr_family,
gsize i_tokens;
tokens = nm_utils_strsplit_set (s, " \t");
nm_assert (tokens);
for (i_tokens = 0; tokens[i_tokens]; i_tokens++) {
for (i_tokens = 0; tokens && tokens[i_tokens]; i_tokens++) {
gs_free char *t = g_strstrip (g_strdup (tokens[i_tokens]));
if ( _nm_utils_dns_option_validate (t, NULL, NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment