aboutsummaryrefslogtreecommitdiffstats
path: root/src/vasprintf.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-10-16Fix crash with built-in [v]asprintf().bjk/masterBen Kibbey1-3/+18
* src/vasprintf.c (__gpgme_vasprintf): Copy the va_list. -- Not sure why it needs to be done. Maybe because of dereferencing the pointer while doing va_copy() int_vasprintf()? If we remove the _BSD_VA_LIST stuff and pass a regular va_list all is fine.
2014-10-16Add gpgme_set_global_malloc_hooks().Ben Kibbey1-6/+8
* configure.ac: Remove check for vasprintf(). * doc/gpgme.texi: Add documentation. * src/gpgme.h.in (gpgme_malloc_hooks,gpgme_malloc_hooks_t): New. * src/gpgme.h.in (gpgme_set_global_malloc_hooks): New prototype. * src/mem.c, src/mem.h: New. * src/gpgme.c (gpgme_set_global_malloc_hooks): New. * src/gpgme.def, src/libgpgme.vers: Add gpgme_set_global_malloc_hooks. * src/vasprintf.c (vasprintf): Rename to _gpgme_vasprintf(). * src/vasprintf.c (asprintf): Rename to _gpgme_asprintf(). * src/Makefile.am: Add mem.c, mem.h and vasprintf.c to main_sources. * src/assuan-support.c, src/ath-pthread.c, src/conversion.c, src/data-compat.c, src/data-identify.c, src/data-mem.c, src/data.c, src/debug.c, src/decrypt.c, src/dirinfo.c, src/encrypt.c, src/engine-assuan.c, src/engine-g13.c, src/engine-gpg.c, src/engine-gpgconf.c, src/engine-gpgsm.c, src/engine-spawn.c, src/engine-uiserver.c, src/engine.c, src/export.c, src/genkey.c, src/get-env.c, src/gpgme-w32spawn.c, src/gpgme.c, src/import.c, src/key.c, src/keylist.c, src/op-support.c, src/passphrase.c, src/posix-io.c, src/posix-util.c, src/progress.c, src/setenv.c, src/sig-notation.c, src/sign.c, src/signers.c, src/trust-item.c, src/trustlist.c, src/util.h, src/verify.c, src/version.c, src/vfs-create.c, src/vfs-mount.c, src/w32-ce.c, src/w32-ce.h, src/w32-glib-io.c, src/w32-io.c, src/w32-sema.c, src/w32-util.c, src/wait-global.c, src/wait.c: Change allocation functions: free() to _gpgme_free(), malloc() to _gpgme_malloc(), calloc() to _gpgme_calloc(), realloc() to _gpgme_realloc() and strdup() to _gpgme_strdup(). -- Mostly borrowed from libassuan for custom memory handling. This changes vasprintf.c to implement _gpgme_asprintf() and _gpgme_vasprintf() and will always use the built-in vasprintf() even when provided by the OS.
2012-09-25Remove all trailing whitespace from source filesWerner Koch1-3/+3
-- Command used: sed -i 's,[ \t]*$,,' FILE
2010-11-172010-11-17 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+14
* vasprintf.c (int_vasprintf) [HAVE_W32CE_SYSTEM]: Just use a fixed size buffer, as va_copy is not easy to fake.
2008-11-03008-11-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+0
* configure.ac: Replace gpgme paths with src. * gpgme: Move to ... * src: ... this new directory. assuan/ 2008-11-03 Marcus Brinkmann <[email protected]> * Makefile.am (INCLUDES): Replace gpgme path with src. tests/ 2008-11-03 Marcus Brinkmann <[email protected]> * gpgsm/Makefile.am (INCLUDES, LDADD): Replace gpgme path with src. * gpg/Makefile.am (INCLUDES, LDADD, t_thread1_LDADD): Likewise. * Makefile.am (LDADD): Likewise.
2003-11-13Silly me: Reverted last change. The code here is actually okay butWerner Koch1-4/+4
when driving the one for gnupg, the bug was probably introduced.
2003-11-13(int_vasprintf): ARGS should not be a pointer.Werner Koch1-5/+5
2002-08-29* vasprintf.c (va_copy): Define macro if not yet defined.Werner Koch1-1/+1
2002-08-292002-08-29 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+14
* passphrase.c (_gpgme_passphrase_status_handler): Reset CTX->result.passphrase->no_passphrase if passphrase is given (good or bad). Submitted by Jean DIRAISON <[email protected]>.
2002-08-20* vasprintf.c (int_vasprintf): Hack to handle NULL passed for %s.Werner Koch1-1/+7
2002-07-252002-07-25 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-4/+23
* Makefile.am (libgpgme_la_LDADD): Add @LIBOBJS@ for vasprintf and fopencookie. * vasprintf.c: Update to more recent libiberty version. * debug.h: Replace #elsif with #elif. Submitted by St�phane Corth�sy: * util.h (vasprintf): Correct prototype. * encrypt-sign.c: Include <stddef.h>. (encrypt_sign_status_handler): Change type of ENCRYPT_INFO_LEN to size_t. * ath-pthread.c: Include <stdlib.h>, not <malloc.h>. * ath-pth.c: Likewise.
2002-02-13* vasprintf.c, fopencookie.c: Add replacement functions.Werner Koch1-0/+155
* util.h: Add prototypes for them.