python/stevedore: update to 5.4.0
[oi-userland.git] / components / sysutils / gpgme / patches / 002-ttyname_r.patch
blobb268de463b78ad7618e305f3a05c858cb9c99adf
1 The buffer must be at least _POSIX_PATH_MAX in size - ttyname_r(3C)
3 diff -ur gpgme-1.13.1-1/src/engine-assuan.c gpgme-1.13.1/src/engine-assuan.c
4 --- gpgme-1.13.1-1/src/engine-assuan.c 2019-12-21 11:18:22.704167504 +0000
5 +++ gpgme-1.13.1/src/engine-assuan.c 2019-12-21 11:21:44.062848391 +0000
6 @@ -42,6 +42,7 @@
7 #include <locale.h>
8 #endif
9 #include <errno.h>
10 +#include <limits.h>
12 #include "gpgme.h"
13 #include "util.h"
14 @@ -289,7 +290,7 @@
15 if (llass->opt.gpg_agent && (isatty (1) || env_tty || err))
17 int rc = 0;
18 - char dft_ttyname[64];
19 + char dft_ttyname[_POSIX_PATH_MAX];
20 char *dft_ttytype = NULL;
22 if (err)
23 diff -ur gpgme-1.13.1-1/src/engine-g13.c gpgme-1.13.1/src/engine-g13.c
24 --- gpgme-1.13.1-1/src/engine-g13.c 2019-12-21 11:18:22.701001484 +0000
25 +++ gpgme-1.13.1/src/engine-g13.c 2019-12-21 11:20:04.796406704 +0000
26 @@ -37,6 +37,7 @@
27 #endif
28 #include <fcntl.h> /* FIXME */
29 #include <errno.h>
30 +#include <limits.h>
32 #include "gpgme.h"
33 #include "util.h"
34 @@ -221,7 +222,7 @@
35 int argc;
36 const char *argv[5];
37 char *dft_display = NULL;
38 - char dft_ttyname[64];
39 + char dft_ttyname[_POSIX_PATH_MAX];
40 char *env_tty = NULL;
41 char *dft_ttytype = NULL;
42 char *optstr;
43 diff -ur gpgme-1.13.1-1/src/engine-gpg.c gpgme-1.13.1/src/engine-gpg.c
44 --- gpgme-1.13.1-1/src/engine-gpg.c 2019-12-21 11:18:22.706600650 +0000
45 +++ gpgme-1.13.1/src/engine-gpg.c 2019-12-21 11:21:04.738476348 +0000
46 @@ -33,6 +33,7 @@
47 #ifdef HAVE_LOCALE_H
48 #include <locale.h>
49 #endif
50 +#include <limits.h>
52 #include "gpgme.h"
53 #include "util.h"
54 @@ -473,7 +474,7 @@
55 engine_gpg_t gpg;
56 gpgme_error_t rc = 0;
57 char *dft_display = NULL;
58 - char dft_ttyname[64];
59 + char dft_ttyname[_POSIX_PATH_MAX];
60 char *dft_ttytype = NULL;
61 char *env_tty = NULL;
63 diff -ur gpgme-1.13.1-1/src/engine-gpgsm.c gpgme-1.13.1/src/engine-gpgsm.c
64 --- gpgme-1.13.1-1/src/engine-gpgsm.c 2019-12-21 11:18:22.708151679 +0000
65 +++ gpgme-1.13.1/src/engine-gpgsm.c 2019-12-21 11:20:36.018909932 +0000
66 @@ -36,6 +36,7 @@
67 #ifdef HAVE_LOCALE_H
68 #include <locale.h>
69 #endif
70 +#include <limits.h>
71 #include <fcntl.h> /* FIXME */
73 #include "gpgme.h"
74 @@ -275,7 +276,7 @@
75 int child_fds[5];
76 int nchild_fds;
77 char *dft_display = NULL;
78 - char dft_ttyname[64];
79 + char dft_ttyname[_POSIX_PATH_MAX];
80 char *env_tty = NULL;
81 char *dft_ttytype = NULL;
82 char *optstr;
83 diff -ur gpgme-1.13.1-1/src/engine-uiserver.c gpgme-1.13.1/src/engine-uiserver.c
84 --- gpgme-1.13.1-1/src/engine-uiserver.c 2019-12-21 11:18:22.703862196 +0000
85 +++ gpgme-1.13.1/src/engine-uiserver.c 2019-12-21 11:22:07.166004600 +0000
86 @@ -36,6 +36,7 @@
87 #ifdef HAVE_UNISTD_H
88 # include <unistd.h>
89 #endif
90 +#include <limits.h>
91 #include <locale.h>
92 #include <fcntl.h> /* FIXME */
93 #include <errno.h>
94 @@ -247,7 +248,7 @@
95 gpgme_error_t err = 0;
96 engine_uiserver_t uiserver;
97 char *dft_display = NULL;
98 - char dft_ttyname[64];
99 + char dft_ttyname[_POSIX_PATH_MAX];
100 char *env_tty = NULL;
101 char *dft_ttytype = NULL;
102 char *optstr;