diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index aa83765d..06a2c02c 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 bb6b81d9..6d11899b 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 5dc4ece1..42b4ec2b 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. */