[gvfs] afc: null-terminate choices string array
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afc: null-terminate choices string array
- Date: Thu, 23 Aug 2012 09:57:18 +0000 (UTC)
commit 99d06e499f999459f1fc973c870415a004722d54
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Aug 22 22:30:16 2012 +0200
afc: null-terminate choices string array
Fixes extra buttons appearing in the dialog.
The fact that we pass the array length doesn't guarantee that the
function we are calling will actually work fine with a non
null-terminated array; in fact it ultimately gets passed to the
autogenerated GDBus code, which expects it to be null-terminated,
causing memory access out of the array bounds, and into the
content-types string array.
https://bugzilla.gnome.org/show_bug.cgi?id=682496
daemon/gvfsbackendafc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 32c7f0a..623eb7d 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -407,7 +407,7 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
char **dcim_afcinfo;
plist_t value;
lockdownd_error_t lerr;
- const gchar *choices[] = {_("Try again"), _("Cancel")};
+ const gchar *choices[] = {_("Try again"), _("Cancel"), NULL};
gboolean aborted = FALSE;
gchar *message = NULL;
gint choice;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]