Commit Graph

64 Commits

Author SHA1 Message Date
Ambrose Li
73949a3e12 Rudimentary support for figure, figcaption 2020-08-21 04:26:26 -04:00
Jia Zhouyang
996287e2fd Add error handling code for fopen
Check the return value of fopen, and add proper error handling code.
2018-03-04 20:50:49 +08:00
Kyle J. McKay
d398b40332 file.c: compute correct base URL when not absolute
When a server makes use of the PATH_INFO feature in a CGI,
the returned pages may often have a <base href="..." /> tag
specifying the URL of the CGI itself as the base.

However, to avoid hard-coding the scheme and host into such
a base href, the href value will often omit the scheme, host
and port.

Make sure that when parsing any such base href value that
any omitted components are taken from the current URL rather
than taken as being from a bare, absolute file:/// URL.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
2017-08-23 11:48:38 -07:00
Tatsuya Kinoshita
aa2077e06f Prevent heap-use-after-free read in HTMLlineproc0()
Bug-Debian: https://github.com/tats/w3m/issues/81
2016-12-18 01:20:14 +09:00
Tatsuya Kinoshita
7a2675b4a5 Prevent infinite loop in feed_textarea()
Bug-Debian: https://github.com/tats/w3m/issues/85
2016-12-18 00:44:36 +09:00
Tatsuya Kinoshita
6eea841d3a Prevent overflow beyond the end of string in caller of get_mclen()
Bug-Debian: https://github.com/tats/w3m/issues/59
Bug-Debian: https://github.com/tats/w3m/issues/73
Bug-Debian: https://github.com/tats/w3m/issues/74
Bug-Debian: https://github.com/tats/w3m/issues/76
Bug-Debian: https://github.com/tats/w3m/issues/79
Bug-Debian: https://github.com/tats/w3m/issues/80
Bug-Debian: https://github.com/tats/w3m/issues/83
Bug-Debian: https://github.com/tats/w3m/issues/84
2016-12-16 00:44:44 +09:00
Tatsuya Kinoshita
107810c145 Revert "Prevent overflow beyond the end of string in proc_mchar()"
This reverts commit 512ed467d1.
2016-12-15 22:55:23 +09:00
Tatsuya Kinoshita
2aa21dc328 Revert "Prevent overflow beyond the end of string in proc_mchar()"
This reverts commit e79d0ec2a0.
2016-12-15 22:42:12 +09:00
Tatsuya Kinoshita
e79d0ec2a0 Prevent overflow beyond the end of string in proc_mchar()
Bug-Debian: https://github.com/tats/w3m/issues/80
cf. https://github.com/tats/w3m/issues/59
2016-12-13 23:04:18 +09:00
Tatsuya Kinoshita
26484fc138 Prevent heap-use-after-free in HTMLlineproc0()
Bug-Debian: https://github.com/tats/w3m/issues/65
2016-12-07 22:09:06 +09:00
Tatsuya Kinoshita
ecf5771419 Prevent negative values for offset and pos in push_link()
Bug-Debian: https://github.com/tats/w3m/issues/64
2016-12-07 21:57:37 +09:00
Tatsuya Kinoshita
512ed467d1 Prevent overflow beyond the end of string in proc_mchar()
Bug-Debian: https://github.com/tats/w3m/issues/59
2016-12-07 21:24:44 +09:00
Tatsuya Kinoshita
d7f55d5959 Prevent negative array index in process_textarea()
Bug-Debian: https://github.com/tats/w3m/issues/58
2016-12-05 21:48:30 +09:00
Tatsuya Kinoshita
f34c37f315 Prevent negative array index for marks in HTMLlineproc2body()
Bug-Debian: https://github.com/tats/w3m/issues/61
2016-12-05 21:48:20 +09:00
Tatsuya Kinoshita
0e66622582 Prevent negative value of row for pushTable() in HTMLlineproc0()
Bug-Debian: https://github.com/tats/w3m/issues/67
2016-12-05 21:48:20 +09:00
Tatsuya Kinoshita
6c6a2cbced Prevent negative array index in getMetaRefreshParam()
Bug-Debian: https://github.com/tats/w3m/issues/63
2016-12-05 21:48:08 +09:00
Kuang-che Wu
41a607b06e fix uninitialized variable in process_img(). fix #44 2016-11-27 15:33:34 +08:00
Tatsuya Kinoshita
ecfdcbe113 Prevent deref null pointer in HTMLlineproc0()
Bug-Debian: https://github.com/tats/w3m/issues/42
2016-11-17 19:33:09 +09:00
Tatsuya Kinoshita
2a4a2fb9f1 Prevent infinite recursion with nested table and textarea
Bug-Debian: https://github.com/tats/w3m/issues/20#issuecomment-260590257
2016-11-15 20:11:52 +09:00
Tatsuya Kinoshita
9db438094e Prevent null pointer deref due to bad form id
Bug-Debian: https://github.com/tats/w3m/issues/39
2016-11-14 21:22:13 +09:00
Tatsuya Kinoshita
0c3f5d0e0d Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38
2016-11-14 21:20:44 +09:00
Tatsuya Kinoshita
a59a35211c Prevent null pointer dereference in HTMLlineproc2body for textarea_int
Bug-Debian: https://github.com/tats/w3m/issues/32#issuecomment-260170163
2016-11-13 17:33:53 +09:00
Tatsuya Kinoshita
ff8510ab95 Prevent infinite recursion in HTMLlineproc0
Bug-Debian: https://github.com/tats/w3m/issues/36
2016-11-07 21:14:50 +09:00
Tatsuya Kinoshita
af592aa5f1 Prevent crash after allocate string of negative size
Bug-Debian: https://github.com/tats/w3m/issues/33
2016-11-07 19:02:42 +09:00
Tatsuya Kinoshita
216722ed72 Prevent memory exhausted due to repeat appending "</table>"
Bug-Debian: https://github.com/tats/w3m/issues/23
2016-11-07 01:25:49 +09:00
Tatsuya Kinoshita
c6c39973e7 Prevent null pointer dereference in HTMLlineproc2body
Bug-Debian: https://github.com/tats/w3m/issues/32
2016-11-07 00:35:42 +09:00
Tatsuya Kinoshita
33509cc81e Fix uninitialised values for <i> and <dd>
Bug-Debian: https://github.com/tats/w3m/issues/16
2016-08-20 07:12:41 +09:00
Tatsuya Kinoshita
6612318232 Revert "Fix uninitialised values for <i> and <dd>"
This reverts commit 0fba2f1a6e.
cf. 0fba2f1a6e (commitcomment-18703355)
2016-08-20 06:57:56 +09:00
Tatsuya Kinoshita
0fba2f1a6e Fix uninitialised values for <i> and <dd>
Bug-Debian: https://github.com/tats/w3m/issues/16
2016-08-19 19:05:25 +09:00
Tatsuya Kinoshita
010b68580d Prevent segfault with malformed input_alt
Bug-Debian: https://github.com/tats/w3m/issues/18
2016-08-18 19:26:58 +09:00
Tatsuya Kinoshita
67be73b03a Prevent segfault with incorrect button type
Bug-Debian: https://github.com/tats/w3m/issues/17
2016-08-18 00:21:08 +09:00
Tatsuya Kinoshita
3d4eeda9ec Prevent segfault with incorrect form_int fid
Bug-Debian: https://github.com/tats/w3m/issues/15
2016-08-17 23:47:44 +09:00
Tatsuya Kinoshita
a25fd09f74 Prevent negative array index for selectnumber and textareanumber
Bug-Debian: https://github.com/tats/w3m/issues/12
2016-08-17 19:47:19 +09:00
Tatsuya Kinoshita
4317749639 Truncate large values of table attributes
Bug-Debian: https://github.com/tats/w3m/issues/11
2016-08-16 22:19:55 +09:00
Tatsuya Kinoshita
59b91cd8e3 Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7
2016-08-09 00:02:24 +09:00
Tatsuya Kinoshita
15b6fb04b9 Fix mistake of unescape spaces for _doFileCopy
cf. [w3m-dev-en 00751], [w3m-dev-en 00752] on 2002-06-09
2016-03-29 19:15:15 +09:00
Tatsuya Kinoshita
a1368c5793 Do not use C99-style comments 2015-09-06 21:54:28 +09:00
David Crosby
aaa4ef6a72 Mitigate issue #16 found by @kcwu 2015-09-06 21:17:36 +09:00
David Crosby
dd9d2a9752 Remove unused value 2015-08-11 21:59:27 +09:00
David Crosby
7e5b33c30e Remove dead assignments flagged by Clang static analysis 2015-08-11 21:59:27 +09:00
David Crosby
8c9b27b954 Fix resource leak in AuthDigestCred 2015-08-11 21:59:27 +09:00
Richard Quirk
1970c42320 Initialise hidden_input to NULL
This prevents a possible use of garbage value on line 3017.
2015-07-25 14:50:04 +02:00
Richard Quirk
34af5c2465 use pclose for pipe 2015-07-25 14:49:57 +02:00
Tatsuya Kinoshita
0efbaf15c3 New option "display_borders" to display 0 pixel table borders.
cf. http://d.hatena.ne.jp/rubikitch/20101120
2015-02-02 23:09:34 +09:00
Araki Ken
2fe66f3a6f Add -sixel option which supports image processing by img2sixel. 2014-12-06 20:47:05 +09:00
Araki Ken
0640eca05c * file.c: nw and ni are rounded up instead of rounded off to show every corner of images. 2014-12-06 20:47:04 +09:00
Araki Ken
a95a178971 * terms.c: Change time to wait for the response of "\x1b[14t\x1b[18t" from 0.1 sec to 0.5 sec.
* image.c:
  - clearImage() works.
  - Use cached image files created by w3m in getImage().

* file.c: Hack for alignment.
2014-12-06 20:47:04 +09:00
Tatsuya Kinoshita
1d8d8d4e2a Merge branch 'bug/refresh-url' 2013-11-11 00:45:03 +09:00
Paul Boekholt
d349b98025 Add support for single quoted meta refresh URL
Bug: https://sourceforge.net/p/w3m/patches/53/
2013-11-11 00:44:08 +09:00
Tatsuya Kinoshita
f7ff70f6da Merge branch 'bug/win64gc'
Conflicts:
	istream.c
	main.c
2013-10-14 23:02:26 +09:00