diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-08-04 04:36:24 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-08-04 04:36:24 +0800 |
commit | c6daf26adefee3e3c92b4123c2cdd987b42515de (patch) | |
tree | aee36010c8d0cd956cfa0c43003ab6b0f803af1c /camel | |
parent | 9fd0fc50be6c949866e92b5e1c26f8022eb20a5d (diff) | |
download | gsoc2013-evolution-c6daf26adefee3e3c92b4123c2cdd987b42515de.tar.gz gsoc2013-evolution-c6daf26adefee3e3c92b4123c2cdd987b42515de.tar.zst gsoc2013-evolution-c6daf26adefee3e3c92b4123c2cdd987b42515de.zip |
Minor changes to the iconv code so that it does the check in the return
2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (pgp_verify): Minor changes to the iconv
code so that it does the check in the return value of iconv() just
like the code in camel-mime-utils.c in case this fixes Bo Rosen's
gpg bugs (but I doubt this will change anything?).
svn path=/trunk/; revision=11622
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-pgp-context.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index e969917624..7b95db4ad9 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,12 @@ 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> + * camel-pgp-context.c (pgp_verify): Minor changes to the iconv + code so that it does the check in the return value of iconv() just + like the code in camel-mime-utils.c in case this fixes Bo Rosen's + gpg bugs (but I doubt this will change anything?). + +2001-08-03 Jeffrey Stedfast <fejj@ximian.com> + * providers/smtp/camel-smtp-transport.c (smtp_connect): First check to make sure that service->url->authmech is non-NULL before passing it into strcmp to avoid a segfault. diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index 292279b229..d92fa93cae 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -998,15 +998,21 @@ pgp_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream, cd = iconv_open ("UTF-8", locale); if (cd != (iconv_t) -1) { const char *inbuf; + int ret; inbuf = diagnostics; - iconv (cd, &inbuf, &inlen, &outbuf, &outlen); + ret = iconv (cd, &inbuf, &inlen, &outbuf, &outlen); + if (ret >= 0) { + iconv (cd, NULL, 0, &outbuf, &outlen); + } iconv_close (cd); *outbuf = '\0'; } else { const char *inptr, *inend; + g_warning ("CamelPgpContext::pgp_verify: cannot convert from %s to UTF-8", locale); + inptr = diagnostics; inend = inptr + inlen; |