[gmime/gmime-2-4] Fixed decoding of some rfc2184 parameters
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime/gmime-2-4] Fixed decoding of some rfc2184 parameters
- Date: Wed, 24 Oct 2012 03:46:33 +0000 (UTC)
commit fa786e581b26c49518dd2667667d39737a4a3e60
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 78ff7a9..36a0513 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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-04-12 Jeffrey Stedfast <fejj gnome org>
* gmime/gmime-parser.c (parser_scan_headers): Make sure to
diff --git a/gmime/gmime-param.c b/gmime/gmime-param.c
index 74c846f..c3b4bcf 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]