mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 14:20:33 -04:00
This is a recommit of r565281 fixing a typo in r565281, causing a regression. CVE-2021-26937 segfaults when displayingsome UTF-8 characters described in https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00000.html. PR: 253515 Reported by: daniel.engberg.lists at pyret.net Obtained from: https://build.opensuse.org/request/show/871482 MFH: 2020Q1 Security: CVE-2021-26937
24 lines
585 B
C
24 lines
585 B
C
--- ansi.c.orig 2020-02-05 12:09:38.000000000 -0800
|
|
+++ ansi.c 2021-02-14 11:10:31.759160000 -0800
|
|
@@ -692,10 +692,6 @@
|
|
}
|
|
curr->w_rend.font = 0;
|
|
}
|
|
-# ifdef DW_CHARS
|
|
- if (curr->w_encoding == UTF8 && utf8_isdouble(c))
|
|
- curr->w_mbcs = 0xff;
|
|
-# endif
|
|
if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c))
|
|
{
|
|
int ox, oy;
|
|
@@ -730,6 +726,10 @@
|
|
}
|
|
break;
|
|
}
|
|
+# ifdef DW_CHARS
|
|
+ if (curr->w_encoding == UTF8 && utf8_isdouble(c))
|
|
+ curr->w_mbcs = 0xff;
|
|
+# endif
|
|
font = curr->w_rend.font;
|
|
# endif
|
|
# ifdef DW_CHARS
|