File: 0004-Fix-incorrect-callback-arguments.patch

package info (click to toggle)
gpa 0.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,204 kB
  • sloc: ansic: 46,130; sh: 5,364; makefile: 284; xml: 26; sed: 16
file content (83 lines) | stat: -rw-r--r-- 2,555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From: Sam James via Gnupg-devel <gnupg-devel@gnupg.org>
Date: Sun, 10 Aug 2025 03:36:11 +0100
Subject: Fix incorrect callback arguments

* src/gpa-marshal.list: Add two entries.
* src/gpacontext.c (gpa_context_class_init): Fix "progress" signal.
* src/gpakeyexpireop.c (gpa_key_expire_operation_class_init):
Use gpa_marshal_VOID__POINTER_POINTER.

--

Some users reported a crash downstream in Gentoo with
g_type_check_is_value_type getting a garbage type. This turns out to
be because 95e07080a2a08196cafb05b69345ea1d629424b1 replaced the
types (and argument counts) incorrectly.

Fix that by adding to gpa_marshal.list to create custom marshal types
and use those instead, and fix the argument count.

Bug: https://bugs.gentoo.org/957196
Fixes: 95e07080a2a08196cafb05b69345ea1d629424b1
Signed-off-by: Sam James <sam@gentoo.org>

ChangeLog entries added by wk.
---
 src/gpa-marshal.list | 2 ++
 src/gpacontext.c     | 5 +++--
 src/gpakeyexpireop.c | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gpa-marshal.list b/src/gpa-marshal.list
index 081ce17..941257d 100644
--- a/src/gpa-marshal.list
+++ b/src/gpa-marshal.list
@@ -1 +1,3 @@
 INT:STRING,STRING
+VOID:INT,INT
+VOID:POINTER,POINTER
diff --git a/src/gpacontext.c b/src/gpacontext.c
index 91bd85f..31301c0 100644
--- a/src/gpacontext.c
+++ b/src/gpacontext.c
@@ -25,6 +25,7 @@
 #include "gpa.h"
 #include "gpgmetools.h"
 #include "gpacontext.h"
+#include "gpa-marshal.h"
 
 /* GObject type functions */
 
@@ -145,9 +146,9 @@ gpa_context_class_init (GpaContextClass *klass)
                         G_SIGNAL_RUN_FIRST,
                         G_STRUCT_OFFSET (GpaContextClass, progress),
                         NULL, NULL,
-                        g_cclosure_marshal_VOID__INT,
+                        gpa_marshal_VOID__INT_INT,
                         G_TYPE_NONE, 2,
-			G_TYPE_INT);
+			G_TYPE_INT, G_TYPE_INT);
 }
 
 static void
diff --git a/src/gpakeyexpireop.c b/src/gpakeyexpireop.c
index a489087..25e489e 100644
--- a/src/gpakeyexpireop.c
+++ b/src/gpakeyexpireop.c
@@ -31,6 +31,7 @@
 #endif
 
 #include "gpa.h"
+#include "gpa-marshal.h"
 #include "gpakeyexpireop.h"
 #include "expirydlg.h"
 #include "gpgmeedit.h"
@@ -114,7 +115,7 @@ gpa_key_expire_operation_class_init (GpaKeyExpireOperationClass *klass)
 		  G_SIGNAL_RUN_FIRST,
 		  G_STRUCT_OFFSET (GpaKeyExpireOperationClass, new_expiration),
 		  NULL, NULL,
-		  g_cclosure_marshal_VOID__POINTER,
+		  gpa_marshal_VOID__POINTER_POINTER,
 		  G_TYPE_NONE, 2,
 		  G_TYPE_POINTER,
 		  G_TYPE_POINTER);