Re: [screen-devel] [bug #60030] [CVE-2021-26937] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Axel Beckert
Hi Felix, On Tue, Feb 09, 2021 at 08:04:41AM -0500, Felix Weinmann wrote: > URL: > > > Summary: Screen segfaults by displaying some UTF-8 character > combination > Project: GNU Screen > Submitted by: lixfel >

[screen-devel] [bug #60030] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Michael Schröder
Follow-up Comment #1, bug #60030 (project screen): Try this: diff --git a/src/encoding.c b/src/encoding.c index 11c3c41..e1ea364 100644 --- a/src/encoding.c +++ b/src/encoding.c @@ -1164,7 +1164,9 @@ void utf8_handle_comb(unsigned int c, struct mchar *mc) if (c1 >= 0xd800 && c1 <

Re: [screen-devel] [bug #60030] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Axel Beckert
Hi Michael, On Wed, Feb 10, 2021 at 08:59:15AM -0500, Michael Schröder wrote: > diff --git a/src/encoding.c b/src/encoding.c > index 11c3c41..e1ea364 100644 > --- a/src/encoding.c > +++ b/src/encoding.c > @@ -1164,7 +1164,9 @@ void utf8_handle_comb(unsigned int c, struct mchar *mc) >

Re: [screen-devel] [bug #60030] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Axel Beckert
Hi again, Axel Beckert wrote: > On Wed, Feb 10, 2021 at 08:59:15AM -0500, Michael Schröder wrote: > > diff --git a/src/encoding.c b/src/encoding.c > > index 11c3c41..e1ea364 100644 > > --- a/src/encoding.c > > +++ b/src/encoding.c > > @@ -1164,7 +1164,9 @@ void utf8_handle_comb(unsigned int c, str

Re: [screen-devel] [bug #60030] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Tavis Ormandy
On 2021-02-10, Axel Beckert wrote: > + else if (i < sizeof combchars / sizeof *combchars) { This doesn't seem right, I think it should be compared against the calloc param at the top of utf8_handle_comb(), but I don't really understand enough about unicode to know where that 0x802 comes from! I

Re: [screen-devel] [bug #60030] Screen segfaults by displaying some UTF-8 character combination

2021-02-10 Thread Axel Beckert
Hi Tavis, thanks for having a look into this! Tavis Ormandy wrote: > On 2021-02-10, Axel Beckert wrote: > > + else if (i < sizeof combchars / sizeof *combchars) { > > This doesn't seem right, I think it should be compared against the > calloc param at the top of utf8_handle_comb(), Good point,