tests/gpgscm: Dynamically allocate string buffer.
authorJustus Winter <justus@g10code.com>
Thu, 31 Mar 2016 11:33:03 +0000 (13:33 +0200)
committerJustus Winter <justus@g10code.com>
Fri, 17 Jun 2016 09:38:00 +0000 (11:38 +0200)
commit8e5ad9aabdd57457f76078924d33acb94b75a877
tree04c6984da2be173b9b8f119d2d7c7764691f47b8
parent3b100da9ada9171d873a796eaf3351d4fceed394
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 <justus@g10code.com>
tests/gpgscm/scheme-private.h
tests/gpgscm/scheme.c