Mercurial > pidgin
diff src/gtkhtml.c @ 829:9a123b171f46
[gaim-migrate @ 839]
yay. i have a secret. but basically this should fix most outstanding libfaim issues in gaim.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sat, 02 Sep 2000 02:41:57 +0000 |
| parents | 678bdc430df7 |
| children | 2804dc8e9ba0 |
line wrap: on
line diff
--- a/src/gtkhtml.c Fri Sep 01 23:45:43 2000 +0000 +++ b/src/gtkhtml.c Sat Sep 02 02:41:57 2000 +0000 @@ -2896,6 +2896,9 @@ * HTK_SCROLLED_WINDOW(GTK_WIDGET(layout)->parent)->vscrollbar->allocation.width) - 8; */ + /* FIXME: gtk_text_measure can overflow if the text is too long. hopefully that will + * never happen though. but it is very possible. NOTE: this is not a buffer overflow, + * it just means it won't display text properly. */ while (gdk_text_measure(cfont, text, num) > maxwidth) { if (num > 1) @@ -3107,7 +3110,7 @@ GdkColormap *map; GdkFont *cfont; GdkRectangle area; - char ws[BUF_LONG], + char *ws, tag[BUF_LONG], *c, *url = NULL; @@ -3151,6 +3154,7 @@ cfont = getfont(current->font, bold, italic, fixed, current->size); c = text; + ws = g_malloc(strlen(text) + 2); while (*c) { @@ -3594,6 +3598,7 @@ */ } + g_free(ws); gdk_window_get_size(html->html_area, NULL, &height); area.height = height;
