diff options
author | Justus Winter <[email protected]> | 2016-11-04 12:45:30 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-11-04 12:45:30 +0000 |
commit | 1f45878a72f23d4bae08d73b614096b485f35274 (patch) | |
tree | d6003ad9080daba09931524ae94bce745cac8948 | |
parent | gpgscm: Implement 'atexit'. (diff) | |
download | gnupg-1f45878a72f23d4bae08d73b614096b485f35274.tar.gz gnupg-1f45878a72f23d4bae08d73b614096b485f35274.zip |
gpgscm: Fix printing strings containing zero bytes.
* tests/gpgscm/scheme.c (atom2str): Fix computing the length of Scheme
strings. Scheme strings can contain zero bytes.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | tests/gpgscm/scheme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c index 0e31dc55c..44dd16559 100644 --- a/tests/gpgscm/scheme.c +++ b/tests/gpgscm/scheme.c @@ -2041,7 +2041,9 @@ static void atom2str(scheme *sc, pointer l, int f, char **pp, int *plen) { } } else if (is_string(l)) { if (!f) { - p = strvalue(l); + *pp = strvalue(l); + *plen = strlength(l); + return; } else { /* Hack, uses the fact that printing is needed */ *pp=sc->strbuff; *plen=0; |