office-gobmx/external/gpgmepp/ubsan.patch
Taichi Haradaguchi 97c67afac1 Update gpgme to 1.20.0
* remove external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1
  and external/gpgmepp/gcc9.patch that were applied upstream.
* remove unneccesary external/gpgmepp/macos-include.patch.
* remove a bit of external/gpgmepp/w32-build-fixes.patch.1
  that was applied upstream.

Change-Id: I9982a3a47e62a5e06e3c04ddc3ee3f247eefa8ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153544
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi  <20001722@ymail.ne.jp>
2023-06-26 16:53:40 +02:00

46 lines
984 B
Diff

--- src/engine-gpg.c
+++ src/engine-gpg.c
@@ -62,6 +62,15 @@
building command line to this location. */
char arg[FLEXIBLE_ARRAY_MEMBER]; /* Used if data above is not used. */
};
+struct arg_without_data_s
+{
+ struct arg_and_data_s *next;
+ gpgme_data_t data;
+ int inbound;
+ int dup_to;
+ int print_fd;
+ int *arg_locp;
+};
struct fd_data_map_s
@@ -335,19 +344,20 @@
a = malloc (offsetof (struct arg_and_data_s, arg));
if (!a)
return gpg_error_from_syserror ();
- a->data = data;
- a->inbound = inbound;
- a->arg_locp = NULL;
+ struct arg_without_data_s *a2 = (struct arg_without_data_s *)a;
+ a2->data = data;
+ a2->inbound = inbound;
+ a2->arg_locp = NULL;
if (dup_to == -2)
{
- a->print_fd = 1;
- a->dup_to = -1;
+ a2->print_fd = 1;
+ a2->dup_to = -1;
}
else
{
- a->print_fd = 0;
- a->dup_to = dup_to;
+ a2->print_fd = 0;
+ a2->dup_to = dup_to;
}
if (front)