changeset 13133:541486fde12b

[gaim-migrate @ 15495] SF Patch #1419139 from Christophe Chapuis (tofe2tofe) "Tests have been added to check if the '\' character can be skipped in the theme. Another test has been added to check there is no buffer overrun while reading the smiley definition." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Feb 2006 07:46:35 +0000
parents ba82cc4d1abd
children b2d838b7eb00
files COPYRIGHT src/gtkthemes.c
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Feb 06 07:34:55 2006 +0000
+++ b/COPYRIGHT	Mon Feb 06 07:46:35 2006 +0000
@@ -45,6 +45,7 @@
 Julien Cegarra
 Cerulean Studios, LLC
 Jonathan Champ
+Christophe Chapuis
 Ka-Hing Cheung
 Sadrul Habib Chowdhury
 Arturo Cisneros, Jr.
--- a/src/gtkthemes.c	Mon Feb 06 07:34:55 2006 +0000
+++ b/src/gtkthemes.c	Mon Feb 06 07:46:35 2006 +0000
@@ -172,8 +172,8 @@
 			while  (*i) {
 				char l[64];
 				int li = 0;
-				while (!isspace(*i)) {
-					if (*i == '\\' && *(i+1) != '\0' )
+				while (!isspace(*i) && li < sizeof(l) - 1) {
+					if (*i == '\\' && *(i+1) != '\0' && *(i+1) != '\n' && *(i+1) != '\r')
 						i++;
 					l[li++] = *(i++);
 				}