[gmime] Fixed decoding of some rfc2184 parameters
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed decoding of some rfc2184 parameters
- Date: Wed, 13 Jun 2012 14:06:10 +0000 (UTC)
commit 9f3b7c1fdb89a32a6d85523723a263dfa5b0e292
Author: Jeffrey Stedfast <fejj gnome org>
Date: Wed Jun 13 10:05:25 2012 -0400
Fixed decoding of some rfc2184 parameters
2012-06-13 Jeffrey Stedfast <fejj gnome org>
* gmime/gmime-param.c (rfc2184_param_new): Only decode the
* charset
and lang if the parameter is actually encoded. Thanks to Peter
Bloomfield for this patch.
ChangeLog | 6 ++++++
gmime/gmime-param.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 89b6be2..fa8c461 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-06-13 Jeffrey Stedfast <fejj gnome org>
+ * gmime/gmime-param.c (rfc2184_param_new): Only decode the charset
+ and lang if the parameter is actually encoded. Thanks to Peter
+ Bloomfield for this patch.
+
+2012-06-13 Jeffrey Stedfast <fejj gnome org>
+
* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Keep track of
DECRYPTION_OKAY status.
(gpg_decrypt): Only return NULL if decryption failed (e.g. we
diff --git a/gmime/gmime-param.c b/gmime/gmime-param.c
index e38dc23..496ef0d 100644
--- a/gmime/gmime-param.c
+++ b/gmime/gmime-param.c
@@ -507,7 +507,12 @@ rfc2184_param_new (char *name, char *value, int id, gboolean encoded)
rfc2184->parts = g_ptr_array_new ();
rfc2184->next = NULL;
- rfc2184->charset = rfc2184_param_charset (&inptr, &rfc2184->lang);
+ if (encoded) {
+ rfc2184->charset = rfc2184_param_charset (&inptr, &rfc2184->lang);
+ } else {
+ rfc2184->charset = NULL;
+ rfc2184->lang = NULL;
+ }
if (inptr == value) {
rfc2184_param_add_part (rfc2184, value, id, encoded);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]