tdf#161541 sd: fix the orientation of handouts on the printed page
[LibreOffice.git] / external / gpgmepp / ubsan.patch
blobc23ab80ad0070143c064304ab2d74bd88ccb715b
1 --- src/engine-gpg.c
2 +++ src/engine-gpg.c
3 @@ -62,6 +62,15 @@
4 building command line to this location. */
5 char arg[FLEXIBLE_ARRAY_MEMBER]; /* Used if data above is not used. */
6 };
7 +struct arg_without_data_s
8 +{
9 + struct arg_and_data_s *next;
10 + gpgme_data_t data;
11 + int inbound;
12 + int dup_to;
13 + int print_fd;
14 + int *arg_locp;
15 +};
18 struct fd_data_map_s
19 @@ -335,19 +344,20 @@
20 a = malloc (offsetof (struct arg_and_data_s, arg));
21 if (!a)
22 return gpg_error_from_syserror ();
23 - a->data = data;
24 - a->inbound = inbound;
25 - a->arg_locp = NULL;
26 + struct arg_without_data_s *a2 = (struct arg_without_data_s *)a;
27 + a2->data = data;
28 + a2->inbound = inbound;
29 + a2->arg_locp = NULL;
31 if (dup_to == -2)
33 - a->print_fd = 1;
34 - a->dup_to = -1;
35 + a2->print_fd = 1;
36 + a2->dup_to = -1;
38 else
40 - a->print_fd = 0;
41 - a->dup_to = dup_to;
42 + a2->print_fd = 0;
43 + a2->dup_to = dup_to;
46 if (front)