Mailing List Archive

Bug in gcry_sexp_nth_data
When reading binary data using gcry_sexp_nth_data and the first byte has a
value of 0 (numeric), the pointer which I get is offset to the next
character. It is probably the first non-zero character, but I have not been
able to confirm this (just getting used to library).

This should not happen, esp. for binary data.

Garrett Kajmowicz
gkajmowi@tbaytel.net
Re: Bug in gcry_sexp_nth_data [ In reply to ]
Garrett Kajmowicz <gkajmowi@tbaytel.net> writes:

> When reading binary data using gcry_sexp_nth_data and the first byte
> has a value of 0 (numeric), the pointer which I get is offset to the
> next character.

Can you please provide few lines of example code, especially how you
created that S-Expression? I inserted a value of #0023# into an
S-Expression and gcry_sexp_nth_data gave me a pointer to a two byte
long string, containing the correct bytes [\x00\x23].

moritz
--
((gpg-key-id . "6F984199")
(email . "moritz@duesseldorf.ccc.de")
(webpage . "http://duesseldorf.ccc.de/~moritz/"))