Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for images:local
home:lafenghu
NetworkManager
nm-gerror-must-be-null.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nm-gerror-must-be-null.patch of Package NetworkManager
From: Jeff Mahoney <jeffm@suse.com> Subject: NetworkManager: GError * must be initialized to NULL References: bnc#757656 The glib GError API expects a GError ** that it uses to assign an API-allocated error descriptor. It expects that the calling code has initialized to the pointer to NULL. If the pointer is uninitialized, it will use whatever garbage is on the stack causing crashes or, depending on the caller, potential memory corruption. During testing with _MALLOC_PERTURB enabled, I encountered a crash due to this issue where error->message contained the perturb value. The following patch fixes the remaining call sites. Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- libnm-glib/nm-object.c | 2 +- libnm-glib/nm-remote-settings.c | 2 +- src/nm-manager.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -1248,7 +1248,7 @@ reload_complete (NMObject *object) NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object); GSimpleAsyncResult *simple; GSList *results, *iter; - GError *error; + GError *error = NULL; results = priv->reload_results; priv->reload_results = NULL; --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -109,7 +109,7 @@ static void _nm_remote_settings_ensure_inited (NMRemoteSettings *self) { NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (self); - GError *error; + GError *error = NULL; if (!priv->inited) { if (!g_initable_init (G_INITABLE (self), NULL, &error)) { --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -789,7 +789,7 @@ pending_activation_check_authorized (Pen { char *error_desc = NULL; gulong sender_uid = G_MAXULONG; - GError *error; + GError *error = NULL; const char *wifi_permission = NULL; NMConnection *connection; NMSettings *settings;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor