!24 update to 4.9.0

From: @hongjinghao 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-10-21 06:54:27 +00:00 committed by Gitee
commit 46d582a5cb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 5 additions and 64 deletions

View File

@ -1,61 +0,0 @@
Description: [CVE-2021-26937] Fix out of bounds array access
Author: Michael Schröder <mls@suse.de>
Bug-Debian: https://bugs.debian.org/982435
Bug: https://savannah.gnu.org/bugs/?60030
Bug: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00000.html
Bug-OSS-Security: https://www.openwall.com/lists/oss-security/2021/02/09/3
Origin: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00010.html
--- a/encoding.c
+++ b/encoding.c
@@ -43,7 +43,7 @@
# ifdef UTF8
static int recode_char __P((int, int, int));
static int recode_char_to_encoding __P((int, int));
-static void comb_tofront __P((int, int));
+static void comb_tofront __P((int));
# ifdef DW_CHARS
static int recode_char_dw __P((int, int *, int, int));
static int recode_char_dw_to_encoding __P((int, int *, int));
@@ -1093,15 +1093,18 @@
{ 0xE0100, 0xE01EF }
};
+ if (c >= 0xdf00 && c <= 0xdfff)
+ return 1; /* dw combining sequence */
return bisearch(c, combining, sizeof(combining) / sizeof(struct interval) - 1);
}
static void
-comb_tofront(root, i)
-int root, i;
+comb_tofront(i)
+int i;
{
for (;;)
{
+ int root = i >= 0x700 ? 0x801 : 0x800;
debug1("bring to front: %x\n", i);
combchars[combchars[i]->prev]->next = combchars[i]->next;
combchars[combchars[i]->next]->prev = combchars[i]->prev;
@@ -1163,9 +1166,9 @@
{
/* full, recycle old entry */
if (c1 >= 0xd800 && c1 < 0xe000)
- comb_tofront(root, c1 - 0xd800);
+ comb_tofront(c1 - 0xd800);
i = combchars[root]->prev;
- if (c1 == i + 0xd800)
+ if (i == 0x800 || i == 0x801 || c1 == i + 0xd800)
{
/* completely full, can't recycle */
debug("utf8_handle_comp: completely full!\n");
@@ -1189,7 +1192,7 @@
mc->font = (i >> 8) + 0xd8;
mc->fontx = 0;
debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
- comb_tofront(root, i);
+ comb_tofront(i);
}
#else /* !UTF8 */

Binary file not shown.

BIN
screen-4.9.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
Name: screen
Epoch: 1
Version: 4.8.0
Release: 11
Version: 4.9.0
Release: 1
Summary: A full-screen window manager
License: GPLv3+
URL: http://www.gnu.org/software/screen
@ -12,7 +12,6 @@ Patch1: screen-4.3.1-screenrc.patch
Patch2: screen-E3.patch
Patch3: screen-4.3.1-suppress_remap.patch
Patch4: screen-4.3.1-crypt.patch
Patch5: backport-CVE-2021-26937.patch
BuildRequires: automake autoconf gcc ncurses-devel texinfo
BuildRequires: systemd
@ -98,6 +97,9 @@ fi
%{_infodir}/screen.info*
%changelog
* Fri Oct 21 2022 hongjinghao <hongjinghao@huawei.com> - 1:4.9.0-1
- update to 4.9.0
* Sat Jun 19 2021 panxiaohe <panxiaohe@huawei.com> - 1:4.8.0-11
- remove '--enable-telnet' in configure