Home GnuPG
Diffusion GPGME de4a1ea684e1

Fix a memory access and a double slash bug.
de4a1ea684e1Unpublished

Unpublished Commit · Learn More

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

Description

Fix a memory access and a double slash bug.

* src/engine-spawn.c (engspawn_start): Allocate space for list
terminator.
* src/posix-util.c (walk_path): Fix trailing slash detection.

Kudos to Valgrind for pointing out these two problems.

The first is a plain allocation bug in a code pattern I have written
thousands of times - this time it went wrong. The allocation is not
user controlled thus not directly exploitable.

The second is missed to do what it intended to do. Found due to the
access of malloced but not initialized memory. Not using calloc
again proved to be helpful to detect logical error.

Details

Provenance
wernerAuthored on May 8 2014, 8:35 PM
Parents
rMd5fb92cdaed2: Map public key algos returned by gpg to gpgme values.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rMde4a1ea684e1: Fix a memory access and a double slash bug. (authored by Werner Koch <wk@gnupg.org>).May 8 2014, 8:35 PM