Diffusion GPGME de4a1ea684e1

Fix a memory access and a double slash bug.

Authored by werner on May 8 2014, 8:35 PM.

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

Committed
wernerMay 8 2014, 8:35 PM
Parents
rMd5fb92cdaed2: Map public key algos returned by gpg to gpgme values.
Branches
Unknown
Tags
Unknown
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