diff options
author | Jeffrey Stedfast <jestedfa@microsoft.com> | 2020-05-24 16:48:42 -0400 |
---|---|---|
committer | Jeffrey Stedfast <jestedfa@microsoft.com> | 2020-05-24 16:48:42 -0400 |
commit | e83530afd378b6c913d7bbe614e41cc4eb4ad62f (patch) | |
tree | ce7111695eb2a4c2ec30e2daf03320dabb1376ee | |
parent | 507b1499d9aa0402b6fd929c0a5f252b9e3df4e9 (diff) | |
download | gmime-e83530afd378b6c913d7bbe614e41cc4eb4ad62f.tar.gz |
Fixed parameter list parsing logic to not report a warning when everything is valid
-rw-r--r-- | gmime/gmime-param.c | 7 | ||||
-rw-r--r-- | gmime/gmime-parser.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gmime/gmime-param.c b/gmime/gmime-param.c index ca419d25..238b2990 100644 --- a/gmime/gmime-param.c +++ b/gmime/gmime-param.c @@ -1335,9 +1335,12 @@ decode_param_list (GMimeParserOptions *options, const char *in, gint64 offset) t = (struct _rfc2184_param *) &list; rfc2184_hash = g_hash_table_new (g_mime_strcase_hash, g_mime_strcase_equal); - skip_cfws (&inptr); - do { + skip_cfws (&inptr); + + if (*inptr == '\0') + break; + /* invalid format? */ if (!decode_param (options, &inptr, &name, &value, &id, &rfc2047_charset, &encoded, &method, offset)) { skip_cfws (&inptr); diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c index b8eb64e4..a116036c 100644 --- a/gmime/gmime-parser.c +++ b/gmime/gmime-parser.c @@ -2010,7 +2010,7 @@ parser_scan_multipart_subparts (GMimeParser *parser, GMimeParserOptions *options break; } - /* This part has no content, but that will be handled in in parser_construct_multipart() + /* This part has no content, but that will be handled in parser_construct_multipart() * or parser_consruct_leaf_part(). */ } |