[Pkg-gnupg-commit] [gnupg2] 23/124: gpgscm: Fix creation of temporary directories.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 5 15:55:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 171e4314ebd3ff74af3dcdc8bd68e1100e8910ea
Author: Justus Winter <justus at g10code.com>
Date: Mon Mar 6 17:14:58 2017 +0100
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 at g10code.com>
---
tests/gpgscm/ffi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index 42facee..34e573f 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list