1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: New function cmp_canon_sexp.

* common/sexputil.c (cmp_canon_sexp): New.
(cmp_canon_sexp_def_tcmp): New.
* common/t-sexputil.c (test_cmp_canon_sexp): Add a simple test.
--

To be used to fix
GnuPG-bug-id: 5061

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit b6ba6a79ce)
This commit is contained in:
Werner Koch 2020-09-11 15:23:22 +02:00
parent 0eed0ced9b
commit 473e649ea1
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 200 additions and 2 deletions

View file

@ -250,8 +250,8 @@ parse_ber_header (unsigned char const **buffer, size_t *size,
returned as a pointer into the original buffer at TOK and TOKLEN.
If a parentheses is the next token, TOK will be set to NULL.
TOKLEN is checked to be within the bounds. On error an error code
is returned and no pointer is not guaranteed to point to
a meaningful value. DEPTH should be initialized to 0 and will
is returned and pointers are not guaranteed to point to
meaningful values. DEPTH should be initialized to 0 and will
reflect on return the actual depth of the tree. To detect the end
of the S-expression it is advisable to check DEPTH after a
successful return.