summaryrefslogtreecommitdiffstats
path: root/www/elinks
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-10-08 03:44:49 +0000
committeredwin <edwin@FreeBSD.org>2003-10-08 03:44:49 +0000
commit4725c855f9a48b554e6552a9855d69e63b6c3ea5 (patch)
tree2ef6052ab4c4b3983ab750bca9898988b0761396 /www/elinks
parent1416a05c83e462d44e220eab7d0276dbae329811 (diff)
downloadFreeBSD-ports-4725c855f9a48b554e6552a9855d69e63b6c3ea5.zip
FreeBSD-ports-4725c855f9a48b554e6552a9855d69e63b6c3ea5.tar.gz
Port update: www/elinks Elinks crashes on frameset webpages
I noticed elinks crashes most of the times after parsing a web page which includes framesets (try loading a frameset with for example rows="200,*"). This occurs because it tries to free some arbitrary block of memory without checking if the previous functions returned errors. PR: ports/56668 Submitted by: Mário Freitas <sub_0@netcabo.pt> Approved by: Jason Harris <jharris@widomaker.com>
Diffstat (limited to 'www/elinks')
-rw-r--r--www/elinks/Makefile2
-rw-r--r--www/elinks/files/patch-src::document::html::parser.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/www/elinks/Makefile b/www/elinks/Makefile
index b73d69a2..988be55 100644
--- a/www/elinks/Makefile
+++ b/www/elinks/Makefile
@@ -7,7 +7,7 @@
PORTNAME= elinks
PORTVERSION= 0.4.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= http://elinks.or.cz/download/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.asc
diff --git a/www/elinks/files/patch-src::document::html::parser.c b/www/elinks/files/patch-src::document::html::parser.c
new file mode 100644
index 0000000..c90bd55
--- /dev/null
+++ b/www/elinks/files/patch-src::document::html::parser.c
@@ -0,0 +1,13 @@
+--- src/document/html/parser.c.orig Sat Sep 6 02:09:37 2003
++++ src/document/html/parser.c Sat Sep 6 02:10:14 2003
+@@ -2330,8 +2330,8 @@
+ parse_frame_widths(d, y, HTML_FRAME_CHAR_HEIGHT, &fp.yw, &fp.y);
+ fp.parent = html_top.frameset;
+ if (fp.x && fp.y) html_top.frameset = special_f(ff, SP_FRAMESET, &fp);
+- mem_free(fp.xw);
+- mem_free(fp.yw);
++ if (fp.x) mem_free(fp.xw);
++ if (fp.y) mem_free(fp.yw);
+
+ free_cd:
+ mem_free(c);
OpenPOWER on IntegriCloud