mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 gcc 8.3.0 and valgrind 3.14.0.
This commit is contained in:
parent
390ae3c309
commit
6ce8fdc4b2
2 changed files with 3 additions and 2 deletions
|
@ -4039,6 +4039,7 @@ read_parameter_file (ctrl_t ctrl, const char *fname )
|
|||
para = NULL;
|
||||
maxlen = 1024;
|
||||
line = NULL;
|
||||
nline = 0;
|
||||
while ( iobuf_read_line (fp, &line, &nline, &maxlen) ) {
|
||||
char *keyword, *value;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue