Mercurial > pidgin.yaz
comparison src/protocols/trepia/trepia.c @ 5751:2951d2435196
[gaim-migrate @ 6176]
Fixed crashes on unescaped data in Trepia profiles.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 04 Jun 2003 18:29:20 +0000 |
parents | cae58ab49118 |
children | 90eea4997759 |
comparison
equal
deleted
inserted
replaced
5750:eb4f129361ca | 5751:2951d2435196 |
---|---|
185 gaim_debug(GAIM_DEBUG_INFO, "trepia", "trepia_status_text\n"); | 185 gaim_debug(GAIM_DEBUG_INFO, "trepia", "trepia_status_text\n"); |
186 gaim_debug(GAIM_DEBUG_MISC, "trepia", "profile = '%s'\n", | 186 gaim_debug(GAIM_DEBUG_MISC, "trepia", "profile = '%s'\n", |
187 trepia_profile_get_profile(profile)); | 187 trepia_profile_get_profile(profile)); |
188 | 188 |
189 if ((value = trepia_profile_get_profile(profile)) != NULL) | 189 if ((value = trepia_profile_get_profile(profile)) != NULL) |
190 text = g_strdup(value); | 190 text = g_markup_escape_text(value, -1); |
191 | 191 |
192 return text; | 192 return text; |
193 } | 193 } |
194 | 194 |
195 static char * | 195 static char * |
262 g_free(text); | 262 g_free(text); |
263 text = tmp2; | 263 text = tmp2; |
264 } | 264 } |
265 | 265 |
266 if ((value = trepia_profile_get_profile(profile)) != NULL) { | 266 if ((value = trepia_profile_get_profile(profile)) != NULL) { |
267 tmp = g_strdup_printf("<b>Profile:</b> %s\n", value); | 267 char *escaped_val = g_markup_escape_text(value, -1); |
268 | |
269 tmp = g_strdup_printf("<b>Profile:</b> %s\n", escaped_val); | |
270 | |
271 g_free(escaped_val); | |
268 | 272 |
269 tmp2 = g_strconcat(text, tmp, NULL); | 273 tmp2 = g_strconcat(text, tmp, NULL); |
270 g_free(tmp); | 274 g_free(tmp); |
271 g_free(text); | 275 g_free(text); |
272 text = tmp2; | 276 text = tmp2; |