From: Marcus Brinkmann Date: Sun, 1 Sep 2002 23:29:55 +0000 (+0000) Subject: 2002-09-02 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~828 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=75ad3659d958d2c6ab7c73cacc7b3d8bd0e0db00;p=gpgme.git 2002-09-02 Marcus Brinkmann * conversion.c (_gpgme_decode_c_string): Set DESTP before modifying DEST. --- 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; }