diff options
author | Werner Koch <wk@gnupg.org> | 2014-01-09 19:14:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-28 12:52:30 +0100 |
commit | cbdc355415f83ed62da4f3618767eba54d7e6d37 (patch) | |
tree | c9f3876b94480a17cbc563ccca13395b1a689b6e /cipher/salsa20.c | |
parent | 7460e9243b3cc050631c37ed4f2713ae7bcb6762 (diff) | |
download | libgcrypt-cbdc355415f83ed62da4f3618767eba54d7e6d37.tar.gz |
sexp: Fix broken gcry_sexp_nth.
* src/sexp.c (_gcry_sexp_nth): Return a valid S-expression for a data
element.
(NODE): Remove unused typedef.
(ST_HINT): Comment unused macro.
* tests/t-sexp.c (bug_1594): New.
(main): Run new test.
--
Before 1.6.0 gcry_sexp_nth (list, 0) with a LIST of "(a (b 3:pqr) (c
3:456) (d 3:xyz))" returned the entire list. 1.6.0 instead returned
NULL. However, this is also surprising and the expected value would
be "(a)". This patch fixes this.
Somewhat related to that gcry_sexp_nth returned a broken list if
requesting index 1 of a list like "(n foo)". It returned just the
"foo" but not as a list which is required by the S-expression specs.
Due to this patch the returned value is now "(foo)".
Thanks to Ludovic Courtès for pointing out these problems.
GnuPG-bug-id: 1594
Diffstat (limited to 'cipher/salsa20.c')
0 files changed, 0 insertions, 0 deletions