Commit Graph

28 Commits

Author SHA1 Message Date
Rene Kita
4e23ee03ca Handle failed system calls
Introduce a separate TU for utility functions util.c. Add a function
exec_cmd to simplify execution of system commands with error handling.

While at it, suppress a warning about unused result when executing a
shell command. As we only display the command's output we do not care
about the exit code.

This fixes Debian bug #398989[0]

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398989
2023-01-04 13:59:49 +01:00
Rene Kita
7c7af9e70c Move declarations to appropiate header files
This is in preparation for the next patch.
2023-01-04 13:59:49 +01:00
Tatsuya Kinoshita
7fdc83b036 Prevent invalid columnPos() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/89
2017-12-27 06:43:52 +09:00
Kyle J. McKay
89e60cc474 form.c: do not gratuitously turn GET into POST
When encountering a <form ...> tag that contains these values:

    method="get" enctype="multipart/form-data"

Do not transform the method into POST to accomodate enctype.

Instead behave in the compatible way that all other browsers
behave in this instance and ignore the enctype parameter
(treating it as the default application/x-www-form-urlencoded)
and perform a "GET" just as the method parameter requests.

This behavior produces far more compatible results than
gratuitously changing the "get" into a "post" which can
result in unexpected "405 Method Not Allowed" errors.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
2017-08-23 13:14:23 -07:00
Tatsuya Kinoshita
eb4130a7cd Preserve one byte for end of string character in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/68#issuecomment-266214643
2016-12-24 13:02:41 +09:00
Tatsuya Kinoshita
dc32152dc0 Prevent invalid form_update_line() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/82
2016-12-24 12:58:44 +09:00
Tatsuya Kinoshita
971b0c1cf9 Revert "Preserve one byte for end of string character in form_update_line()"
This reverts commit a4152aaaea.
2016-12-20 20:20:01 +09:00
Tatsuya Kinoshita
5d665be811 Revert "Prevent overflow beyond the end of string in form_update_line()"
This reverts commit 9ccaa1dd0d.
2016-12-18 00:20:15 +09:00
Tatsuya Kinoshita
eba7f423fc Revert "Prevent overflow beyond the end of string in form_update_line()"
This reverts commit e0efc127ff.
2016-12-18 00:20:06 +09:00
Tatsuya Kinoshita
3eab80f2a1 Revert "Prevent overflow beyond the end of string in textfieldrep()"
This reverts commit 77d8d8d657.
2016-12-15 22:43:33 +09:00
Tatsuya Kinoshita
77d8d8d657 Prevent overflow beyond the end of string in textfieldrep()
Bug-Debian: https://github.com/tats/w3m/issues/79
2016-12-13 22:24:54 +09:00
Tatsuya Kinoshita
a4152aaaea Preserve one byte for end of string character in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/82
cf. https://github.com/tats/w3m/issues/68#issuecomment-266214643
2016-12-13 21:44:40 +09:00
Tatsuya Kinoshita
e0efc127ff Prevent overflow beyond the end of string in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/78
2016-12-10 16:38:44 +09:00
Tatsuya Kinoshita
9ccaa1dd0d Prevent overflow beyond the end of string in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/75
2016-12-09 00:41:19 +09:00
Tatsuya Kinoshita
e2c7ecec6f Prevent dereference near-null pointer in formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/35
2016-11-07 19:21:22 +09:00
Tatsuya Kinoshita
22d29c3d11 Fix incorrect dereference in formUpdateBuffer when MENU_SELECT
cf. ec9eb22e00
2016-10-09 06:01:37 +09:00
Tatsuya Kinoshita
d01de738f5 Prevent global-buffer-overflow write in formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/29
2016-10-08 07:06:12 +09:00
Tatsuya Kinoshita
ec9eb22e00 Fix null pointer dereference in formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/28
2016-10-08 06:39:47 +09:00
Tatsuya Kinoshita
7b88478227 Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/13#issuecomment-242981906
2016-08-29 19:29:19 +09:00
Tatsuya Kinoshita
4a8d16fc8d Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/22
2016-08-24 19:05:58 +09:00
Tatsuya Kinoshita
807e8b7fbf Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/13
2016-08-17 21:10:30 +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
9f0bdcfdf0 Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/9
Bug-Debian: https://github.com/tats/w3m/issues/10
2016-08-15 20:42:27 +09:00
Tatsuya Kinoshita
fa5bc4b95d Merge branch 'feature/siteconf' 2013-04-08 21:56:59 +09:00
Tatsuya Kinoshita
a32bf68c85 Support the siteconf feature
Patch to support the siteconf feature, from [w3m-dev 04463]
on 2012-06-27, provided by AIDA Shinra.
2013-04-08 21:48:49 +09:00
Tatsuya Kinoshita
ea440109c7 Assume "text" if an input type is unknown
Patch from <http://bugs.debian.org/615843> provided by Hilko Bengen.
2012-05-19 19:20:03 +09:00
Tatsuya Kinoshita
5397d09e58 Adding upstream version 0.5.3 2011-05-04 16:41:45 +09:00
Tatsuya Kinoshita
72f72d64a4 Adding upstream version 0.5.1 2011-05-04 16:05:14 +09:00