clients: fix bad array loop in nm-secret-agent-simple.c:strv_has (bgo #752137)

https://bugzilla.gnome.org/show_bug.cgi?id=752137
This commit is contained in:
Jiří Klimeš 2015-07-10 12:35:55 +02:00
parent 66e2c29346
commit 55c3f70ec8

View file

@ -122,10 +122,10 @@ static gboolean
strv_has (gchar **haystack,
gchar *needle)
{
gchar *iter;
gchar **iter;
for (iter = *haystack; iter; iter++) {
if (g_strcmp0 (iter, needle) == 0)
for (iter = haystack; iter && *iter; iter++) {
if (g_strcmp0 (*iter, needle) == 0)
return TRUE;
}