From: Marcus Brinkmann Date: Sun, 1 Sep 2002 23:29:55 +0000 (+0000) Subject: 2002-09-02 Marcus Brinkmann X-Git-Tag: gpgme-0-3-10^0 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c40f22a7d831e8c8ceebb922cb6940ea6a8143a3;p=gpgme.git 2002-09-02 Marcus Brinkmann * conversion.c (_gpgme_decode_c_string): Set DESTP before modifying DEST. --- diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 9497373..abca388 100644 --- a/gpgme/ChangeLog +++ b/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/gpgme/conversion.c b/gpgme/conversion.c index 9e1737f..8302f99 100644 --- a/gpgme/conversion.c +++ b/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; }