From 8ae7216933531a68b2ed3d336c88bff68533f09e Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 22 Jun 2003 20:56:48 +0000 Subject: [PATCH] 2003-06-22 Marcus Brinkmann * data-mem.c (mem_write): Copy original buffer content. --- trunk/gpgme/ChangeLog | 4 ++++ trunk/gpgme/data-mem.c | 2 ++ trunk/gpgme/gpgme.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index aa83765..06a2c02 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2003-06-22 Marcus Brinkmann + + * data-mem.c (mem_write): Copy original buffer content. + 2003-06-22 Marcus Brinkmann * gpgme.h (gpgme_user_ids_release, gpgme_user_ids_append): Remove diff --git a/trunk/gpgme/data-mem.c b/trunk/gpgme/data-mem.c index bb6b81d..6d11899 100644 --- a/trunk/gpgme/data-mem.c +++ b/trunk/gpgme/data-mem.c @@ -66,6 +66,8 @@ mem_write (gpgme_data_t dh, const void *buffer, size_t size) new_buffer = malloc (new_size); if (!new_buffer) return -1; + memcpy (new_buffer, dh->data.mem.orig_buffer, dh->data.mem.length); + dh->data.mem.buffer = new_buffer; dh->data.mem.size = new_size; } diff --git a/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 5dc4ece..42b4ec2 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/gpgme/gpgme.h @@ -63,7 +63,7 @@ extern "C" { AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "0.4.1" +#define GPGME_VERSION "0.4.2" /* Some opaque data types used by GPGME. */ -- 2.26.2