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>
This commit is contained in:
parent
a758aa5732
commit
e2e2d02ab3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90592
2 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
|
|
13
www/elinks/files/patch-src::document::html::parser.c
Normal file
13
www/elinks/files/patch-src::document::html::parser.c
Normal file
|
@ -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);
|
Loading…
Reference in a new issue