From 75ad3659d958d2c6ab7c73cacc7b3d8bd0e0db00 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 1 Sep 2002 23:29:55 +0000 Subject: [PATCH] 2002-09-02 Marcus Brinkmann * conversion.c (_gpgme_decode_c_string): Set DESTP before modifying DEST. --- trunk/gpgme/ChangeLog | 2 ++ trunk/gpgme/conversion.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 9497373..abca388 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,5 +1,7 @@ 2002-09-02 Marcus Brinkmann + * conversion.c (_gpgme_decode_c_string): Set DESTP before modifying DEST. + * conversion.c (_gpgme_decode_c_string): Fix off by one error in last change. * rungpg.c (_gpgme_append_gpg_args_from_signers): Move before _gpgme_op_edit so its prototype is known early on. diff --git a/trunk/gpgme/conversion.c b/trunk/gpgme/conversion.c index 9e1737f..8302f99 100644 --- a/trunk/gpgme/conversion.c +++ b/trunk/gpgme/conversion.c @@ -62,6 +62,8 @@ _gpgme_decode_c_string (const char *src, char **destp) if (!dest) return mk_error (Out_Of_Core); + *destp = dest; + while (*src) { if (*src != '\\') @@ -130,7 +132,6 @@ _gpgme_decode_c_string (const char *src, char **destp) } } *(dest++) = 0; - *destp = dest; return 0; } -- 2.26.2