gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-gtk] branch master updated: -remove call to gtk_builder_set_tran


From: gnunet
Subject: [gnunet-gtk] branch master updated: -remove call to gtk_builder_set_translation_domain(), implementation causes use-after-free
Date: Tue, 13 Jul 2021 18:46:29 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet-gtk.

The following commit(s) were added to refs/heads/master by this push:
     new 2658e8ab -remove call to gtk_builder_set_translation_domain(), 
implementation causes use-after-free
2658e8ab is described below

commit 2658e8ab600a4ba7b1fcdbc403c4a87adb173d9f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jul 13 18:43:16 2021 +0200

    -remove call to gtk_builder_set_translation_domain(), implementation causes 
use-after-free
---
 src/lib/glade.c | 10 +++++++---
 src/lib/nls.c   |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/lib/glade.c b/src/lib/glade.c
index 602487d2..1b094ac1 100644
--- a/src/lib/glade.c
+++ b/src/lib/glade.c
@@ -112,10 +112,14 @@ GNUNET_GTK_get_new_builder2 (const char *filename,
   GError *error;
 
   ret = gtk_builder_new ();
-  gtk_builder_set_translation_domain (ret, "gnunet-gtk");
-  GNUNET_asprintf (&glade_path, "%s%s", GNUNET_GTK_get_data_dir (), filename);
+  GNUNET_asprintf (&glade_path,
+                   "%s%s",
+                   GNUNET_GTK_get_data_dir (),
+                   filename);
   error = NULL;
-  if (0 == gtk_builder_add_from_file (ret, glade_path, &error))
+  if (0 == gtk_builder_add_from_file (ret,
+                                      glade_path,
+                                      &error))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _ ("Failed to load `%s': %s\n"),
diff --git a/src/lib/nls.c b/src/lib/nls.c
index ca57ce32..f1fa372c 100644
--- a/src/lib/nls.c
+++ b/src/lib/nls.c
@@ -33,8 +33,7 @@ void
 GNUNET_GTK_setup_nls ()
 {
 #if ENABLE_NLS
-  struct GNUNET_OS_ProjectData *mypd;
-  struct GNUNET_OS_ProjectData *pd;
+  const struct GNUNET_OS_ProjectData *pd;
   char *path;
 
   pd = GNUNET_OS_project_data_get ();

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]