[gmime: 11/24] Fixed infinite loop in address parser w/ malformed domain literal



commit b29c54cdf44e0043c82b4408452f051933e4b956
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Thu Jul 27 06:24:11 2017 -0400

    Fixed infinite loop in address parser w/ malformed domain literal

 gmime/gmime-parse-utils.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gmime/gmime-parse-utils.c b/gmime/gmime-parse-utils.c
index 43c6f70..4ade524 100644
--- a/gmime/gmime-parse-utils.c
+++ b/gmime/gmime-parse-utils.c
@@ -354,7 +354,7 @@ decode_subliteral (const char **in, GString *domain)
                        inptr++;
                        got = TRUE;
                } else if (is_lwsp (*inptr)) {
-                       skip_cfws (&inptr);
+                       skip_lwsp (&inptr);
                } else {
                        break;
                }
@@ -417,8 +417,9 @@ g_mime_decode_domain (const char **in, GString *domain)
                        if (*inptr == ']') {
                                g_string_append_c (domain, ']');
                                inptr++;
-                       } else
+                       } else {
                                w(g_warning ("Missing ']' in domain-literal: %s", *in));
+                       }
                } else {
                        if (!(atom = decode_atom (&inptr))) {
                                w(g_warning ("Unexpected char '%c' in domain: %s", *inptr, *in));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]