After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707966 - Fixes for ignore-hosts setting handling
Fixes for ignore-hosts setting handling
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-12 11:31 UTC by Rui Matos
Modified: 2013-09-13 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Don't include spaces in proxy's ignore-hosts setting (1.44 KB, patch)
2013-09-12 11:31 UTC, Rui Matos
committed Details | Review
network: Fix empty ignore-hosts setting (1.74 KB, patch)
2013-09-12 11:31 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-09-12 11:31:47 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1003152 for the
original bug report.
Comment 1 Rui Matos 2013-09-12 11:31:49 UTC
Created attachment 254770 [details] [review]
network: Don't include spaces in proxy's ignore-hosts setting

We should also ignore any zero length strings resulting from
g_strsplit_set().
Comment 2 Rui Matos 2013-09-12 11:31:53 UTC
Created attachment 254771 [details] [review]
network: Fix empty ignore-hosts setting

If the ignore-hosts setting is set to an empty array we were using
unintialized memory.

This also now ignores zero length strings if there are any in the
array.
Comment 3 Matthias Clasen 2013-09-13 00:46:00 UTC
Review of attachment 254770 [details] [review]:

looks good, otherwise

::: panels/network/net-proxy.c
@@ +296,3 @@
+        for (p = av; *p; ++p)
+                if (*p[0] != '\0')
+                        g_variant_builder_add (&builder, "s", *p);

I would put { } around the body of the loop here, just for clarity.
Comment 4 Matthias Clasen 2013-09-13 00:47:19 UTC
Review of attachment 254771 [details] [review]:

that looks nicer anyway, than using a ginormous buffer on the stack
Comment 5 Rui Matos 2013-09-13 11:25:10 UTC
Pushed with braces added to both master and gnome-3-8:

   fc1317d..d2a1764  gnome-3-8 -> gnome-3-8
   5f21f92..0f64dd1  master -> master

Attachment 254770 [details] pushed as fb74444 - network: Don't include spaces in proxy's ignore-hosts setting
Attachment 254771 [details] pushed as 0f64dd1 - network: Fix empty ignore-hosts setting