core: New helper function _gpgme_strconcat.
authorWerner Koch <wk@gnupg.org>
Thu, 22 Sep 2016 10:41:55 +0000 (12:41 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 22 Sep 2016 10:42:10 +0000 (12:42 +0200)
commitdc39552d01094eff2bef5f9fcd1c16928909d20e
treeb7f5e7eaf50d578e44e218fb36d3e373831d8666
parent7a6543c2dfeef874a34086c8f3eeb1dbdf1ce822
core: New helper function _gpgme_strconcat.

* src/conversion.c: Include stdarg.h.
(do_strconcat): New.
(_gpgme_strconcat): New.
* src/util.h: Provide fallback for GPGRT_ATTR_SENTINEL.
(_gpgme_strconcat): New with sentinel.

* src/w32-util.c (find_program_in_dir): Replace malloc and stpcpy by
_gpgme_strconcat.
(find_program_at_standard_place): Ditto.
(_gpgme_set_default_gpg_name): Ditto.
(_gpgme_set_default_gpgconf_name): Ditto.
(_gpgme_mkstemp): Ditto.
(_gpgme_set_override_inst_dir): Repalce malloc and strcpy by strdup.
--

The function has been taken from gnupg/common/stringhelp.c and license
changed to LPGLv2.1+.  I am the original author of that code.

Signed-off-by: Werner Koch <wk@gnupg.org>
src/conversion.c
src/util.h
src/w32-util.c