diff options
author | Ben Chan <benchan@chromium.org> | 2017-08-11 11:23:22 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2017-08-11 17:41:22 -0500 |
commit | cbbf01945591749cbb49f6d67cdbe52edfb36039 (patch) | |
tree | 0282e5f66ad591722cce7efd1c926c93716cb088 | |
parent | 4e22730846923b37d532ce649f126759d8947c4b (diff) | |
download | ModemManager-cbbf01945591749cbb49f6d67cdbe52edfb36039.tar.gz |
plugin: fix forbidden_product_strings check in apply_post_probing_filters
This patch fixes a bug in apply_post_probing_filters() where it iterates
through `self->priv->forbidden_product_strings' but incorrectly accesses
`self->priv->product_strings[i]' inside the loop.
`self->priv->forbidden_product_strings[i]' should be accessed instead.
(cherry picked from commit 36e7cd50cec29e3ef0d61646ebf072b20dab06f5)
-rw-r--r-- | src/mm-plugin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c index 78b767d8a..195818f97 100644 --- a/src/mm-plugin.c +++ b/src/mm-plugin.c @@ -536,8 +536,8 @@ apply_post_probing_filters (MMPlugin *self, gchar *casefolded_vendor; gchar *casefolded_product; - casefolded_vendor = g_utf8_casefold (self->priv->product_strings[i].l, -1); - casefolded_product = g_utf8_casefold (self->priv->product_strings[i].r, -1); + casefolded_vendor = g_utf8_casefold (self->priv->forbidden_product_strings[i].l, -1); + casefolded_product = g_utf8_casefold (self->priv->forbidden_product_strings[i].r, -1); found = (!!strstr (vendor, casefolded_vendor) && !!strstr (product, casefolded_product)); g_free (casefolded_vendor); |