diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-08-22 22:30:16 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-08-23 11:56:07 +0200 |
commit | 99d06e499f999459f1fc973c870415a004722d54 (patch) | |
tree | a83c8c41af87c190d2748e07555f72e46c06d95b /daemon/gvfsbackendafc.c | |
parent | 3babe9b7cb664185ef0a54ce55a9be07de20c661 (diff) | |
download | gvfs-99d06e499f999459f1fc973c870415a004722d54.tar.gz |
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
Diffstat (limited to 'daemon/gvfsbackendafc.c')
-rw-r--r-- | daemon/gvfsbackendafc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c index 32c7f0ae..623eb7d5 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; |