Commit Graph

657 Commits

Author SHA1 Message Date
Alexander Naumov
2dc7d0ce2b compiler -Wpointer-sign warning fix 2022-01-15 06:46:44 +02:00
Alexander Naumov
1176586e72 strlen_onscreen() expects unsinged char * 2022-01-15 06:43:32 +02:00
Alexander Naumov
19d60fc562 Code Reformating: mark.c 2022-01-15 06:41:07 +02:00
Alexander Naumov
70f794ae39 Code Refactoring: fileio.c 2022-01-15 06:02:26 +02:00
Stuart Henderson
c1217dcee9 fix data type for ioctl() in osdef.h.in 2022-01-15 04:46:23 +02:00
Roland Illig
c43fb85a2d fix: array subscript has type 'char' 2022-01-15 04:04:40 +02:00
Alexander Naumov
191567a245 Code Reformating: braille_tsi.c 2022-01-15 03:55:53 +02:00
Alexander Naumov
a2fd0f7e12 Code Reformating: sched.c 2022-01-08 17:07:34 +02:00
Alexander Naumov
0cbf46c5f8 doc: screen.textinfo 4.9.0 update 2022-01-08 17:05:30 +02:00
Axel Beckert
4e4f07fea0 doc: fix spelling errors found by lintian 2022-01-08 02:33:43 +02:00
Alexander Naumov
821d888e29 doc: add info about new hardstatus escape %e 2022-01-07 20:42:16 +02:00
Yi-Jheng Lin
491203b275 new hardstatus option %e - currently used encoding 2022-01-07 20:16:59 +02:00
Alexander Naumov
19e44115eb Code Reformating: search.c 2022-01-06 22:11:09 +02:00
Alexander Naumov
7908c33f73 exit_with_usage() return 1 in error case only
"screen -h|--help" should NOT return 1
2022-01-06 21:42:55 +02:00
Alexander Naumov
ba0cf35ad7 remove (unused) variable ‘ip’ 2022-01-06 16:16:31 +02:00
Alexander Naumov
3fd3f96566 COPYNG: http => https update 2022-01-06 03:23:32 +02:00
Alexander Naumov
73a854e13c fix wrong data type (int to char) for is_letter() 2022-01-05 21:50:23 +02:00
Alexander Naumov
669b33c921 update man page for v4.9.0 2022-01-05 17:33:08 +02:00
Michael Schröder
14dcf005db fix combining char handling that could lead to a segfault 2022-01-04 03:34:47 +02:00
Michael Schröder
282ec62662 bugfix CVE-2021-26937
It allows remote attackers to cause a denial of service
(invalid write access and application crash) or possibly
have unspecified other impact via a crafted UTF-8
character sequence.

bugfix: https://savannah.gnu.org/bugs/?60030

Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
2022-01-04 03:11:44 +02:00
Michael Witten
99a906805a [PATCH 2/2] trivial: docs: Add missing ')'.
A cross-reference was intended to be placed inside parentheses,
but the closing parenthesis was forgotten; this commit inserts
that missing closing parenthesis.
2020-12-17 11:59:08 +01:00
Michael Witten
8ebf7e2839 [PATCH 1/2] trivial: docs: Fix typo (s/paramter/parameter)
In the description of the 'stuff' command, there
was the typo "paramter"; this commit makes that
word "parameter".
2020-12-17 11:56:45 +01:00
Taj Morton
ae27fef9fb bugfix: option -X ignores specified user in multiuser env
bug #37437

Thanks to Taj Morton
2020-10-20 15:23:46 +02:00
30c9a2a6c1 TERMCAP_BUF is used in place of TERMCAP_BUFSIZE. 2020-04-27 18:12:56 +02:00
Václav Doležal
92e86ba578 Expand d_xtermosc array in struct display
Commit c5db181 expands index range of "typ2" by one without expanding
affected arrays. d_xtermosc in struct display is one of these.

Related: c5db181b6e
  (ansi: add support for xterm OSC 11)
Related: 68386dfb1f
  (Fix out of bounds access when setting w_xtermosc after OSC 49)

Signed-off-by: Václav Doležal <vdolezal@redhat.com>
2020-02-22 22:30:58 +01:00
Amadeusz Sławiński
067c3ebca4 Release v.4.8.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.8.0
2020-02-05 21:23:48 +01:00
Amadeusz Sławiński
0dd53533e2 Increase permitted length of OSC
hyperlink feature used by some terminals requires lots of characters
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#length-limits
mentions around 2083 characters, set it to a bit more.

Bug: 57718

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-02-05 21:05:28 +01:00
Amadeusz Sławiński
68386dfb1f Fix out of bounds access when setting w_xtermosc after OSC 49
echo -e "\e]49\e;                                    \n\ec"
crashes screen.

This happens because 49 is divided by 10 and used as table index
resulting in access to w_xtermosc[4], which is out of bounds with table
itself being size 4. Increase size of table by 1 to 5, which is enough
for all current uses.

As this overwrites memory based on user input it is potential security
issue.

Reported-by: pippin@gimp.org
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-02-05 21:02:01 +01:00
Scott Shambarger
de672dcdaf Fix configure check for SELECT_BROKEN
Fixes broken ifdef nesting in confgure.ac when checking for SELECT_BROKEN

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-01-31 00:22:09 +01:00
Alexander Naumov
353ca2cd11 Code reformating - tty.sh
Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
2020-01-10 23:23:45 +01:00
Stuart Henderson
3d60ad42ea Adding OpenBSD to the BSD list 2020-01-10 21:59:18 +01:00
Alexander Naumov
1e1a5e9e2d Copyright update for 2020 2020-01-10 21:17:10 +01:00
Alexander Naumov
ef151b339e Typo DEBUG 2020-01-10 21:08:45 +01:00
Alexander Naumov
71c14f2345 Fix return code of '--version' and '-v'
Bug #57571
2020-01-10 20:58:39 +01:00
Scott Shambarger
241553f21c Create TERMCAP entries limited to 1023 bytes by default.
TERMCAP_BUF defaults to 1023 to create TERMCAP entries that work on
most systems.  To save space, TERMCAP is unwrapped, and vt220 extra
keys are skipped (unless TERMCAP_BUF > 1023); navigation keys are
still included.  Entries larger than TERMCAP_BUF are now truncated,
and no longer Panic screen.

Termcap entries are still wrapped when saved to a file.

Signed-off-by: Scott Shambarger <devel@shambarger.net>
2019-12-28 13:45:24 +01:00
Christoph Moench-Tegeder
c4a059f117 Fix coredump on xterm and rxvt
Here's the rub: with TERM=xterm (or rxvt, for that matter), Km
("key_mouse", "Mouse event has occured") is not set (and therefore
NULL), but InitTermcap() (termcap.c:230) happily tries to strdup() that,
which gets us that segfault.

As a band-aid, catch that NULL and don't strdup().

Signed-off-by: Marcin Cieślak <saper@saper.info>
2019-12-28 13:43:34 +01:00
Amadeusz Sławiński
09bbd3eff3 Make closeallfiles() faster
Optimize startup time, making closeallfiles() faster, by doing less
system calls. Instead of calling close for each possible file, use
poll() to check if file exist at all. On linux with open file limit set
to 1048576, it should do 1024 poll() calls instead of 1048576 close().

Bug: 55618

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-12-28 13:41:29 +01:00
Alexander Naumov
b7a7615084 Using 'https' instead of 'http' 2019-11-09 17:54:26 +01:00
Amadeusz Sławiński
1ca2816117 Release v.4.7.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.7.0
2019-10-02 00:02:48 +02:00
Amadeusz Sławiński
c0349fd511 Update ambiguous and wide characters tables to Unicode 12.1.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-10-01 23:55:20 +02:00
Amadeusz Sławiński
fad4c29fd9 Fix broken mouse after ncurses 6.1
ncurses 6.1 changed kmous capability from "\e[M" to "\e[<". It seems to
be done to signal that terminal supports sgr mouse mode. screen assumed
that if kmous is set to "\e[M" it is on xterm compatible terminal
anyway, so just dynamically detect which one is used and override
relevant kmapdef.

InitKeytab() is moved, so kmapdef[] can be overriden before
initialization, as InitTermcap() needs to run first, as far as I can
tell this should have no consequences.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-09-07 18:38:55 +02:00
Amadeusz Sławiński
d6e9a6a693 Clean whole buffer if we don't want to parse it
Fixes problem when pressing arrows in some prompts causes arrows to stop
in other places.

For example pressing up arrow in 'kill --confirm' prompt stops up arrow
from working on 'windowlist'

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-04-17 20:58:05 +02:00
Alexander Naumov
1e5db24077 Copyright update for 2019 2019-03-29 20:35:44 +01:00
Alexander Naumov
ee2e2254bf Typo in man page
bug #56027
2019-03-29 20:33:09 +01:00
Scott Shambarger
498e53ff09 Fix blanker to work when screen is suid root
* Change RunBlanker to call OpenDevice so permissions on slave
  PTY are correctly set.
* Update handling of file descriptors after fork to be similar to
  ForkWindow on at pty (fixes debug and leaked descriptors)
* DEBUG now creates screen.blanker to debug blanker fork
* Allow display of error message when display blocked by blanker
  (because message is probably from blanker failing to start)

Bug: 55512

Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-01-27 16:07:57 +01:00
Scott Shambarger
96718a2146 Prevent Panic causing Panic, and children removing sockets
* Set eff_uid/eff_gid after setuid/setgid to prevent nested Panic
  MakeClientSocket calls xseteuid(eff_uid=0) - results in nested
  Panic and SendErrorMsg not getting sent.
* Set ServerSocket to -1 after fork so that child Panic doesn't
  remove socket in eexit.

Bug: 55511

Applied with some modifications

Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-01-27 16:07:36 +01:00
Václav Doležal
d51308fbff Fix confusing indentation on several places
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2018-11-18 16:01:04 +01:00
Václav Doležal
26e61437ef Fix possible unterminated string
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:01:00 +01:00
Václav Doležal
61d6955517 Fix for nomem handling in resize.c:ChangeWindowSize()
Move `nomem' label of ChangeWindowSize() to the end of function and
add test for value of `nhlines'

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:56 +01:00
Václav Doležal
10ddd81e20 Revert "those 0 assignment made rest of code totally not working"
This reverts commit ff98d7ff58.

This can potentially cause double-free. `nmlines' and `nhlines'
should be freed in preceding lines.

`nmlines' and `nhlines' are not used in the rest of the function
except in `nomem' label and their valuse are copied into `p', so
their value should be zeroed.

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:51 +01:00