Diffusion GPGME 6f4a886b30ca

core: Fix arg counting in enginge-gpg

Authored by aheinecke on Jul 16 2019, 11:39 AM.

Description

core: Fix arg counting in enginge-gpg

* src/engine-gpg.c (build_argv): Properly check for all
arguments and allocate memory for them.

This fixes a potential buffer overflow which could be created
by using unusual and partially contradictory options.
Like offline and auto-key-locate together while
using ignore-mdc-error.
As the list of arguments should not be user controlled the
impact of this is very low.

To ensure that this does not happen in the future an
assert is also added with this patch.

Details

Committed
aheineckeJul 16 2019, 11:39 AM
Parents
rM36428d8cf153: python: doc: Remove generated files, put rules in Makefile.
Branches
Unknown
Tags
Unknown