Diffusion GnuPG 65eb1569809a

gpg: Initialize a parameter to silence valgrind.

Authored by werner on Fri, Sep 4, 11:24 AM.

Description

gpg: Initialize a parameter to silence valgrind.

* g10/keygen.c (read_parameter_file): Initialize nline.
* g10/textfilter.c (copy_clearsig_text): Initialize bufsize.

In iobuf_read_line the parameter to pass and return the current buffer
length is controlled by the buffer parameter. Thus there should be no
problem because the assert call check s buffer first. For yet unknown
reasons when using the standard GNU libc assert valgrind complains
about an uninitialized variable. That does not happen with our
log_assert.

Tested with gnupg 2.2.23 with gcc 8.3.0 and valgrind 3.14.0.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Committed
wernerFri, Sep 4, 11:32 AM
Parents
rGb7f56ba5e3cc: tests: New test run envvar to run gpg under valgrind.
Branches
Unknown
Tags
Unknown