Re: [PATCH weston] terminal: Don't crash when selecting non-ascii characters

2015-09-10 Thread Pekka Paalanen
On Wed, 9 Sep 2015 16:40:18 -0700 Bryce Harrington wrote: > On Wed, Sep 02, 2015 at 04:21:54PM -0500, Derek Foreman wrote: > > So it turns out if you cat /dev/urandom and drag select in the mess > > you can crash weston-terminal. There may also be more legitimate > > ways of doing this. > > > >

Re: [PATCH weston] terminal: Don't crash when selecting non-ascii characters

2015-09-09 Thread Bryce Harrington
On Wed, Sep 02, 2015 at 04:21:54PM -0500, Derek Foreman wrote: > So it turns out if you cat /dev/urandom and drag select in the mess > you can crash weston-terminal. There may also be more legitimate > ways of doing this. > > The reason is that isalpha() and isdigit() only accept values that > fi

[PATCH weston] terminal: Don't crash when selecting non-ascii characters

2015-09-02 Thread Derek Foreman
So it turns out if you cat /dev/urandom and drag select in the mess you can crash weston-terminal. There may also be more legitimate ways of doing this. The reason is that isalpha() and isdigit() only accept values that fit within an unsigned char or are EOF. By treating values < 0 the same as v