diff options
author | Justus Winter <justus@g10code.com> | 2017-03-06 17:14:58 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-03-06 18:10:08 +0100 |
commit | 171e4314ebd3ff74af3dcdc8bd68e1100e8910ea (patch) | |
tree | e1d3173ca09f18b6131015fd5889d32e56164f3b /tests/gpgscm | |
parent | wks: Set published keys world-readable. (diff) | |
download | gnupg2-171e4314ebd3ff74af3dcdc8bd68e1100e8910ea.tar.xz gnupg2-171e4314ebd3ff74af3dcdc8bd68e1100e8910ea.zip |
gpgscm: Fix creation of temporary directories.
* tests/gpgscm/ffi.c (do_mkdtemp): Use a larger buffer for the
template.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests/gpgscm')
-rw-r--r-- | tests/gpgscm/ffi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c index 42facee13..34e573f97 100644 --- a/tests/gpgscm/ffi.c +++ b/tests/gpgscm/ffi.c @@ -26,6 +26,7 @@ #include <errno.h> #include <fcntl.h> #include <gpg-error.h> +#include <limits.h> #include <stdarg.h> #include <stdlib.h> #include <stdio.h> @@ -345,7 +346,11 @@ do_mkdtemp (scheme *sc, pointer args) { FFI_PROLOG (); char *template; - char buffer[128]; +#ifdef PATH_MAX + char buffer[PATH_MAX]; +#else + char buffer[1024]; +#endif char *name; FFI_ARG_OR_RETURN (sc, char *, template, string, args); FFI_ARGS_DONE_OR_RETURN (sc, args); |