From 83cc539b1d1b9c59af37dcbab7fede40dfc0de63 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. --- gpgme/ChangeLog | 4 ++++ gpgme/data-mem.c | 2 ++ gpgme/gpgme.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index aa83765..06a2c02 100644 --- a/gpgme/ChangeLog +++ b/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/gpgme/data-mem.c b/gpgme/data-mem.c index bb6b81d..6d11899 100644 --- a/gpgme/data-mem.c +++ b/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/gpgme/gpgme.h b/gpgme/gpgme.h index 5dc4ece..42b4ec2 100644 --- a/gpgme/gpgme.h +++ b/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