aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/scheme-private.h
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-03-31 11:33:03 +0000
committerJustus Winter <[email protected]>2016-06-17 09:38:00 +0000
commit8e5ad9aabdd57457f76078924d33acb94b75a877 (patch)
tree04c6984da2be173b9b8f119d2d7c7764691f47b8 /tests/gpgscm/scheme-private.h
parenttests/gpgscm: Make exception value available. (diff)
downloadgnupg-8e5ad9aabdd57457f76078924d33acb94b75a877.tar.gz
gnupg-8e5ad9aabdd57457f76078924d33acb94b75a877.zip
tests/gpgscm: Dynamically allocate string buffer.
* tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic. * tests/gpgscm/scheme.c (expand_strbuff): New function. (putcharacter): Adapt length test. (readstrexp): Expand buffer if necessary. (scheme_init_custom_alloc): Initialize buffer. (scheme_deinit): Free buffer. Patch from Thomas Munro, https://sourceforge.net/p/tinyscheme/patches/11/ Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/scheme-private.h')
-rw-r--r--tests/gpgscm/scheme-private.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gpgscm/scheme-private.h b/tests/gpgscm/scheme-private.h
index 404243ef9..0ddfdbcc5 100644
--- a/tests/gpgscm/scheme-private.h
+++ b/tests/gpgscm/scheme-private.h
@@ -139,8 +139,8 @@ char linebuff[LINESIZE];
#ifndef STRBUFFSIZE
#define STRBUFFSIZE 256
#endif
-char strbuff[STRBUFFSIZE];
-
+char *strbuff;
+size_t strbuff_size;
FILE *tmpfp;
int tok;
int print_flag;