Date: Wed, 18 Aug 2004 01:14:48 +0300 From: Andrey Slusar <anray@inet.ua> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/70596: [PATCH] mail/stuphead: fix htmlview crashes Message-ID: <E1BxCEC-000HTo-L8@santinel.home.ua> Resent-Message-ID: <200408172240.i7HMeOm5096474@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70596 >Category: ports >Synopsis: [PATCH] mail/stuphead: fix htmlview crashes >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Aug 17 22:40:23 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andrey Slusar >Release: FreeBSD 5.2-CURRENT i386 >Organization: Santinel >Environment: System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Mon Aug 16 15:35:15 EEST 2004 anray@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386 >Description: New files: files/patch-src::htmlview.c files/patch-src::messageview.c - Fix htmlview segfaults - Bump portrevision >How-To-Repeat: >Fix: --- stuphead.diff begins here --- diff -ruN /usr/ports/mail/stuphead/Makefile stuphead/Makefile --- /usr/ports/mail/stuphead/Makefile Wed Mar 31 07:21:57 2004 +++ stuphead/Makefile Wed Aug 18 00:57:08 2004 @@ -7,7 +7,7 @@ PORTNAME= stuphead PORTVERSION= 0.5.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail gnome MASTER_SITES= http://stuphead.asplinux.ru/stuphead/ diff -ruN /usr/ports/mail/stuphead/files/patch-src::htmlview.c stuphead/files/patch-src::htmlview.c --- /usr/ports/mail/stuphead/files/patch-src::htmlview.c Thu Jan 1 03:00:00 1970 +++ stuphead/files/patch-src::htmlview.c Tue Aug 17 23:57:22 2004 @@ -0,0 +1,11 @@ +--- src/htmlview.c.old Tue Aug 17 23:56:37 2004 ++++ src/htmlview.c Tue Aug 17 23:56:57 2004 +@@ -59,7 +59,7 @@ + + HtmlView *htmlview_create(void) + { +- HtmlView *htmlview; ++ HtmlView *htmlview = NULL; + #ifdef USE_MOZILLA + GtkMozEmbed *mozwin; + gchar *mozpat; diff -ruN /usr/ports/mail/stuphead/files/patch-src::messageview.c stuphead/files/patch-src::messageview.c --- /usr/ports/mail/stuphead/files/patch-src::messageview.c Thu Jan 1 03:00:00 1970 +++ stuphead/files/patch-src::messageview.c Wed Aug 18 00:52:54 2004 @@ -0,0 +1,49 @@ +--- src/messageview.c.orig Wed Aug 18 00:45:00 2004 ++++ src/messageview.c Wed Aug 18 00:51:31 2004 +@@ -80,7 +80,9 @@ + imageview->messageview = messageview; + + htmlview = htmlview_create(); +- htmlview->messageview = messageview; ++ if(htmlview) { ++ htmlview->messageview = messageview; ++ } + + mimeview = mimeview_create(); + mimeview->textview = textview; +@@ -91,7 +93,9 @@ + /* to remove without destroyed */ + gtk_widget_ref(*(GtkWidget **)textview); + gtk_widget_ref(*(GtkWidget **)imageview); +- gtk_widget_ref(*(GtkWidget **)htmlview); ++ if(htmlview) { ++ gtk_widget_ref(*(GtkWidget **)htmlview); ++ } + gtk_widget_ref(*(GtkWidget **)mimeview); + + paned = gtk_vpaned_new(); +@@ -267,17 +271,21 @@ + GtkWidget *textview = *(GtkWidget **)messageview->textview; + GtkWidget *imageview = *(GtkWidget **)messageview->imageview; + GtkWidget *mimeview = *(GtkWidget **)messageview->mimeview; +- GtkWidget *htmlview = *(GtkWidget **)messageview->htmlview; ++ ++ if(messageview->htmlview) { ++ GtkWidget *htmlview = *(GtkWidget **)messageview->htmlview; ++ htmlview_destroy(messageview->htmlview); ++ gtk_widget_destroy(htmlview); ++ } ++ + textview_destroy(messageview->textview); + imageview_destroy(messageview->imageview); +- htmlview_destroy(messageview->htmlview); + mimeview_destroy(messageview->mimeview); + + g_free(messageview); + + gtk_widget_unref(textview); + gtk_widget_unref(imageview); +- gtk_widget_unref(htmlview); + gtk_widget_unref(mimeview); + } + --- stuphead.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BxCEC-000HTo-L8>