Commit Graph

1304 Commits

Author SHA1 Message Date
Alexander Naumov
380b80a509 update manpage for 5.0.0 2024-07-10 15:38:22 +02:00
Alexander Naumov
53850eb874 there is no 'password' command anymore 2024-07-10 14:55:57 +02:00
Alexander Naumov
ae175a2a52 Update Copyright date 2024-07-10 14:54:56 +02:00
Liang Xiaofei
4bd2fac68b Fix crashes after passing through a zmodem transfer
bug#25291
2024-07-10 14:02:58 +02:00
Vincent Lefevre
fcfa6d2da0 Really avoid a potential buffer overflow for 'home'
Indeed, the test
strlen(home) > MAXPATHLEN - 8
is not sufficient due to the terminating null character

(if home has length MAXPATHLEN - 8, then MAXPATHLEN + 1
characters are written, which is larger than the buffer
size MAXPATHLEN).

See also:
b4e5968f0b
2024-07-08 16:16:14 +02:00
Alexander Naumov
bf661de8ce bye bye FAQ 2024-07-07 15:02:37 +02:00
Alexander Naumov
b4e5968f0b Potentially overflowing fix for 'home' 2024-06-26 10:40:23 +02:00
Alexander Naumov
4b52c01265 Update CONTRIBUTORS
Thanks a lot for Elizaveta and Julian
who help to test the new screen's branch.
2024-06-24 09:09:39 +02:00
Alexander Naumov
cfe7a1a115 screen.c: a small code reformat 2024-06-19 18:22:15 +02:00
Vincent Lefèvre
9e8e20596f use wcwdith() in utf8_isdouble() instead of hard-coded tables
bug #63634

Instead of hard-coded tables, screen should use the standard
wcwdith() function, which will ensure consistency with other
software that already uses it (the real terminal and perhaps
libraries like ncurses).
2024-06-18 14:39:41 +02:00
Alexander Naumov
fdd2df8360 set a limit on session-names to 80 symbols
bug #61534

This fix doesn't allow to use session names longer
then this limit. Screen should print error message
in case of too long session name.
2024-06-11 18:30:07 +02:00
Alexander Naumov
f795aec91d man: there are no 'time' and 'debug' anymore 2024-06-11 08:39:53 +02:00
Alexander Naumov
e931d2fe81 sync ChangeLog 2024-06-10 09:17:53 +02:00
Alexander Naumov
277f4a36ac 'userbits' address out of bounce fix
We pass (1, 0) to calloc().
The ACLBYTE macro will return &NULL[(0 + 1) >> 3] equals 0.

On some systems (including OpenBSD) this will return
a zero sized object: a unique pointer that points to
unaccessable memory. This is permitted by the standards.
2024-06-07 14:06:15 +02:00
Alexander Naumov
67514aa778 fix -Wdeprecated-non-prototype
Passing arguments to 'tparm' without a prototype
is deprecated in all versions of C and is not supported
in C2x [-Wdeprecated-non-prototype]
2024-05-30 15:21:41 +02:00
Alexander Naumov
53bbd19757 fix -Wformat-overflow screen.c 2024-05-30 14:00:08 +02:00
Alexander Naumov
35f50657c2 Makefile: update standard to C17 2024-05-30 13:48:54 +02:00
Hayato Hiramatsu
c184c6ec27 [PATCH] Screen buffers ESC keypresses indefinitely since sgr support
bug #57748
2024-03-27 00:41:57 +01:00
Alexander Naumov
cd4d02fa87 sync man page 2024-02-20 13:56:31 +01:00
Alexander Naumov
b2570dec7a autogen.sh: add --install option for autoreconf 2023-12-30 00:13:58 +01:00
Alexander Naumov
84142afbf3 exit_with_usage() returns 1 only in case of error
"screen -h|--help" should NOT return 1

Sync with screen-v4: 7908c33f73
2023-08-22 17:56:25 +02:00
Brahmajit Das
7f320d3a64 Fix call to undeclared function chmod
The chmod function comes from the header file sys/stat.h
which was not included in the source file display.c,
and thus the error.
This patch should fix the build error.

Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
2023-08-07 15:58:19 +02:00
Vincent Lefevre
6931ba07ca Fix bashisms in configure.ac
bug #62076
2023-07-28 13:20:17 +02:00
Alexander Naumov
ecea7aa87d autoupdate AC_PREREQ 2.71 2023-07-28 00:05:46 +02:00
Alexander Naumov
6df4a48ff6 Missing signal sending permission check on failed query messages
When run as setuid root, one can send a query message to the
privileged screen process via its unix socket in order to force
it to send SIGHUP to a PID that can be freely specified in the
query packet.
Processes that do not explicitly handle SIGHUP will simply terminate.

Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
2023-02-01 13:47:57 +02:00
Alexander Naumov
f0f64c4189 httpss->https 2023-01-13 22:45:46 +02:00
Alexander Naumov
c3e84d21b4 http => https 2022-05-29 20:47:40 +03:00
Alexander Naumov
486b7e3fa1 http => https 2022-05-29 20:34:27 +03:00
Vincent Lefevre
c56ab476b9 Avoid zombies after shell exit
As documented in libutempter:
"During execution of the privileged process spawned by these
functions, SIGCHLD signal handler will be temporarily set to
the default action."

Thus in case a SIGCHLD has been lost, we send a SIGCHLD to
oneself in order to avoid zombies:
https://savannah.gnu.org/bugs/?25089
2022-02-17 03:08:26 +02:00
Michael Schröder
3aa385ea52 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-02-02 00:43:14 +02:00
Alexander Naumov
8d19c07b28 man page: copyright update 2022-01-04 01:30:47 +02:00
Michael Witten
21f04b22e0 [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:48:09 +01:00
Michael Witten
8592675371 [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:30:00 +01:00
Taj Morton
58aa0f9f1c bugfix: option -X ignores specified user in multiuser env
bug #37437

Thanks to Taj Morton
2020-10-20 15:45:07 +02:00
f0d6154b95 TERMCAP_BUF is used in place of TERMCAP_BUFSIZE 2020-04-27 18:24:37 +02:00
Václav Doležal
b14e76eb5d Expand d_xtermosc array in struct Display
Commit 7059bff expands index range of "typ2" by one without expanding
affected arrays. d_xtermosc in struct display is one of these.

Related: 7059bff20a
  (ansi: add support for xterm OSC 11)
Related: eb2be1adf9
  (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:40 +01:00
Amadeusz Sławiński
bfb05c34ba 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:07:56 +01:00
Amadeusz Sławiński
eb2be1adf9 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:00:42 +01:00
ed@s5h.net
eb38c84a67 Add escape to show number of currently open windows in hardstatus
String escape format of %C for number of windows with - prefix for
group window count.

Bug: 14484

Signed-off-by: Ed Neville <ed@s5h.net>
2020-02-03 23:42:14 +01:00
Amadeusz Sławiński
c2d797a379 Fix 100% cpu use on one core with poll
If there is no event timeout set just wait for 1 second instead of
setting poll timeout to 0.

Bug: 57697

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-02-03 23:40:11 +01:00
François Revol
e25dd483da Haiku port: Check for some libraries
* libnetwork for sockets,
* libbsd for openpty.
2020-02-03 23:07:38 +01:00
François Revol
f251537616 fix mismatched types in prototype
not everyone defines pid_t as int...
2020-02-03 22:43:29 +01:00
François Revol
469be1421b remove hardcoded -lutil
AC_SEARCH_LIBS prepends the found library already.
2020-02-03 22:40:20 +01:00
François Revol
f91a705879 add dirent.h test back to configure
Haiku doesn't have sys/dir.h which is deprecated anyway,
so it's better to actually use dirent.h if found.
2020-02-03 22:38:45 +01:00
Chris Meyering
9bf0a785ca build: acls.c: mark unused parameters
* src/acls.c (DoSu): avoid four unused-variable warnings
2020-02-02 00:39:44 +01:00
Chris Meyering
b2fb626a38 build: tests/test-winmsgbuf.c: avoid GCC 10 alloca warning
* src/tests/test-winmsgbuf.c (main): Replace alloca with malloc/free
to prevent the following warning: tests/test-winmsgbuf.c:298:19:\
  warning: implicit declaration of function ‘alloca’; did you mean \
  ‘calloc’?
2020-02-02 00:39:39 +01:00
Chris Meyering
2703529ade build: test-winmsgbuf.c: add const to avoid GCC 10 warning
* src/tests/test-winmsgbuf.c:45: make char * const
This avoids the following warning:
tests/test-winmsgbuf.c:45:17: warning: initialization of\
‘char *[...]'from incompatible pointer type ‘const char *[...]'
2020-02-02 00:39:34 +01:00
Chris Meyering
33d9a92d04 cleanup: acls.c: move unused variables into #if-0 block
* src/acls.c (DoSu): avoid two unused-variable warnings
2020-02-02 00:39:29 +01:00
Chris Meyering
23f450eef0 build: cast NULL to (char *) to prevent GCC 10 warning
* src/acls.c (GrowBitfield): replace NULL by (char *)NULL.
This avoids the following warning:
acls.h:44:35: warning: dereferencing ‘void *’ pointer
2020-02-02 00:39:24 +01:00
Amadeusz Sławiński
e73df890cb Refactor condition handling to use offset instead of pointer
If wmc_else() is called after wmb_expand() it can overwrite pointer to
old value. To avoid this issue refactor condition code to use offset
into parsed string instead.

Reported-by: pippin@gimp.org
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-01-31 23:35:14 +01:00