[evolution] I#1697 - e_text_to_html_full: Use large enough buffer for character escape



commit a54bc2cc98167325e2bd2574e9bc77992b57c686
Author: Milan Crha <mcrha redhat com>
Date:   Mon Nov 15 17:00:58 2021 +0100

    I#1697 - e_text_to_html_full: Use large enough buffer for character escape
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1697

 src/e-util/e-html-utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/e-util/e-html-utils.c b/src/e-util/e-html-utils.c
index 65737a004d..c177ae845a 100644
--- a/src/e-util/e-html-utils.c
+++ b/src/e-util/e-html-utils.c
@@ -398,7 +398,7 @@ e_text_to_html_full (const gchar *input,
                } else
                        next = (const guchar *) g_utf8_next_char (cur);
 
-               out = check_size (&buffer, &buffer_size, out, 10);
+               out = check_size (&buffer, &buffer_size, out, 11);
 
                switch (u) {
                case '<':
@@ -472,7 +472,7 @@ e_text_to_html_full (const gchar *input,
                                if (flags & E_TEXT_TO_HTML_ESCAPE_8BIT)
                                        *out++ = '?';
                                else
-                                       out += g_snprintf (out, 9, "&#%d;", u);
+                                       out += g_snprintf (out, 10, "&#%d;", u);
                        }
                        col++;
                        break;


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