aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-11-27 07:43:38 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-11-27 07:43:38 +0000
commit69bcdd242aa2f60c727a477139f38036eab50e47 (patch)
tree5d1c6ecd83cfc8154041751ec214495290e1018a /libsylph
parentbe96efd1b4de4cca6ddb37b24a804f3678961d6d (diff)
libsylph/html.c: html_unescape_str(): strictly check for utf8 length.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3302 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/html.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsylph/html.c b/libsylph/html.c
index 9241793c..a86c07b0 100644
--- a/libsylph/html.c
+++ b/libsylph/html.c
@@ -770,7 +770,7 @@ static gchar *html_unescape_str(HTMLParser *parser, const gchar *str)
gint len;
len = g_unichar_to_utf8((gunichar)ch, buf);
- if (len > 0 && len <= n + 1) {
+ if (len > 0 && len <= 6 && len <= n + 1) {
memcpy(up, buf, len);
up += len;
} else {