changeset 3010:11827e3d714c

[gaim-migrate @ 3023] Fixed a parsing bug regarding IM images. This was most notable when trying to view images in the log viewer (you aren't able to... does anyone want an option to?) committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 05 Mar 2002 18:19:18 +0000
parents f188ae5e575b
children c809f2ed3d92
files src/gtkimhtml.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Tue Mar 05 17:31:06 2002 +0000
+++ b/src/gtkimhtml.c	Tue Mar 05 18:19:18 2002 +0000
@@ -3379,6 +3379,8 @@
 						alltext++;
 					alltext = alltext + strlen("<DATA ID=\"\" SIZE=\"\">") + strlen(id) + strlen(datasize);
 					g_free(tmp);
+					if (atoi(datasize) > len - pos)
+						break;
 					imagedata = g_malloc(atoi(datasize));
 					memcpy(imagedata, alltext, atoi(datasize));