Home GnuPG
Diffusion GnuPG 82c72e2db7bc

dirmngr: Avoid accessing uninitialized memory in log callback.
82c72e2db7bcUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

dirmngr: Avoid accessing uninitialized memory in log callback.

* dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before
use.
(start_connection_thread): Ditto.
(handle_connections): Ditto.

Example valgrind output:

2921== Conditional jump or move depends on uninitialised value(s)

2921== at 0x5BBDEF4: pthread_getspecific (pthread_getspecific.c:57)

2921== by 0x40AAEE: pid_suffix_callback (dirmngr.c:614)

2921== by 0x433F5A: do_logv (logging.c:684)

This is because on 64 bit systems "sizeof aptr > sizeof aint" and thus
Valgrind complains about this. It is no a real problem because we
don't use the unitialized bits.

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

Details

Provenance
wernerAuthored on Jun 16 2015, 12:12 PM
Parents
rG43211f553dd2: build: Distribute swdb.lst with the w32-source target.
Branches
Unknown
Tags
Unknown

Event Timeline