From bcc58d8bc72d02a6a54f52fda53f7f4f1d192d6a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 25 Feb 2003 03:46:06 +0000 Subject: g_alloca (strlen (charset) + 1) so we don't overflow the buffer. 2003-02-24 Jeffrey Stedfast * camel-charset-map.c (camel_charset_canonical_name): g_alloca (strlen (charset) + 1) so we don't overflow the buffer. svn path=/trunk/; revision=20047 --- camel/ChangeLog | 3 +++ camel/camel-charset-map.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 23f21bccff..3b557d9b03 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2003-02-24 Jeffrey Stedfast + * camel-charset-map.c (camel_charset_canonical_name): g_alloca + (strlen (charset) + 1) so we don't overflow the buffer. + * providers/pop3/camel-pop3-stream.c (stream_write): Don't write the passwd, fixes "bug" #38601. diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c index 5fcd490dde..3ae00a5fb8 100644 --- a/camel/camel-charset-map.c +++ b/camel/camel-charset-map.c @@ -400,7 +400,7 @@ camel_charset_canonical_name (const char *charset) if (charset == NULL) return NULL; - name = g_alloca (strlen (charset)); + name = g_alloca (strlen (charset) + 1); strcpy (name, charset); g_ascii_strdown (name, -1); -- cgit