[gtk+/gtk-2-24] printing: Properly initialize auth_info in gtkprintbackend.c
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] printing: Properly initialize auth_info in gtkprintbackend.c
- Date: Mon, 7 Mar 2016 16:57:50 +0000 (UTC)
commit 674d0eb7e91b3b7ba55d5702af30b8b45b399e86
Author: Dariusz Gadomski <dariusz gadomski canonical com>
Date: Thu Oct 2 14:10:39 2014 +0200
printing: Properly initialize auth_info in gtkprintbackend.c
auth_info should be a NULL-terminated array as it is used in
e.g. g_strdupv invocations iterating over its elements until
a NULL element is encountered.
https://bugzilla.gnome.org/show_bug.cgi?id=737777
(cherry picked from commit 15dbadf38992aa09364f0dd06a71a51b99b6e800)
gtk/gtkprintbackend.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index c487d33..e212a42 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -744,7 +744,7 @@ request_password (GtkPrintBackend *backend,
priv->auth_info_required = g_strdupv (ai_required);
length = g_strv_length (ai_required);
- priv->auth_info = g_new0 (gchar *, length);
+ priv->auth_info = g_new0 (gchar *, length + 1);
dialog = gtk_dialog_new_with_buttons ( _("Authentication"), NULL, GTK_DIALOG_MODAL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]