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
|
From 1bce45d716ba687e794421db6ff061673d204e9d Mon Sep 17 00:00:00 2001
Message-ID: <1bce45d716ba687e794421db6ff061673d204e9d.1754900600.git.sam@gentoo.org>
In-Reply-To: <aa63712b18b79b983e3d9cd7ce5105d0ec7ac262.1754900600.git.sam@gentoo.org>
References: <aa63712b18b79b983e3d9cd7ce5105d0ec7ac262.1754900600.git.sam@gentoo.org>
From: Sam James <sam@gentoo.org>
Date: Sun, 10 Aug 2025 03:31:47 +0100
Subject: [PATCH 3/3] Fix incorrect callback arguments
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>
--- a/src/gpa-marshal.list
+++ b/src/gpa-marshal.list
@@ -1 +1,3 @@
INT:STRING,STRING
+VOID:INT,INT
+VOID:POINTER,POINTER
--- 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
--- 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);
--
2.50.1
|