Mercurial > pidgin
comparison src/gtkthemes.c @ 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 | fe2cb084ab16 |
children | 0cc7773b1d87 |
comparison
equal
deleted
inserted
replaced
13132:ba82cc4d1abd | 13133:541486fde12b |
---|---|
170 i = i + 2; | 170 i = i + 2; |
171 } | 171 } |
172 while (*i) { | 172 while (*i) { |
173 char l[64]; | 173 char l[64]; |
174 int li = 0; | 174 int li = 0; |
175 while (!isspace(*i)) { | 175 while (!isspace(*i) && li < sizeof(l) - 1) { |
176 if (*i == '\\' && *(i+1) != '\0' ) | 176 if (*i == '\\' && *(i+1) != '\0' && *(i+1) != '\n' && *(i+1) != '\r') |
177 i++; | 177 i++; |
178 l[li++] = *(i++); | 178 l[li++] = *(i++); |
179 } | 179 } |
180 if (!sfile) { | 180 if (!sfile) { |
181 l[li] = 0; | 181 l[li] = 0; |