diff -ur gpgme-0.4.1/gpgme/data-mem.c /Users/dave/Developer/gpgme-current/gpgme/data-mem.c
--- gpgme-0.4.1/gpgme/data-mem.c	Sun Jul 13 15:21:29 2003
+++ /Users/dave/Developer/gpgme-current/gpgme/data-mem.c	Sun Jun 22 23:27:42 2003
@@ -66,6 +66,8 @@
       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;
     }
