[gnome-control-center] online-accounts: Fix a possible crash on parsing NULL string



commit 234485fd195d6157121f8627c8ba3eda76f7a29a
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sat Aug 13 17:15:48 2022 +0530

    online-accounts: Fix a possible crash on parsing NULL string
    
    If the goa helper fails to find goa helper executable (which happened when run
    without install), %NULL is returned.  Avoid feeding g_variant_parse(), the %NULL
    variable in those case as it is not nullable and avoid the crash that follows.

 panels/online-accounts/cc-online-accounts-panel.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c 
b/panels/online-accounts/cc-online-accounts-panel.c
index 2a626c27e..f4d1a928d 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -394,6 +394,10 @@ list_providers (CcOnlineAccountsPanel *self)
   GVariant *provider;
 
   providers = run_goa_helper_sync ("list-providers", NULL);
+
+  if (!providers)
+    return;
+
   providers_variant = g_variant_parse (G_VARIANT_TYPE ("a(ssviu)"),
                                        providers,
                                        NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]