Re: [PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function

2018-07-18 Thread Nicolas Pitre
On Tue, 17 Jul 2018, Nicolas Pitre wrote: > But still, if nr > 2 that means you need a temporary storage because the > destination memory has to be preserved before the source memory can be > moved there, and that destination memory content cannot be stored in the > vacated source memory until

Re: [PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function

2018-07-17 Thread Nicolas Pitre
On Wed, 18 Jul 2018, Adam Borowski wrote: > On Tue, Jul 17, 2018 at 09:02:40PM -0400, Nicolas Pitre wrote: > > The nr argument is typically small: most often nr == 1. However this > > could be abused with a very large explicit scroll in a resized screen. > > Make the code scroll lines one at a tim

Re: [PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function

2018-07-17 Thread Adam Borowski
On Tue, Jul 17, 2018 at 09:02:40PM -0400, Nicolas Pitre wrote: > The nr argument is typically small: most often nr == 1. However this > could be abused with a very large explicit scroll in a resized screen. > Make the code scroll lines one at a time in all cases to avoid the VLA. > Anything smarter

[PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function

2018-07-17 Thread Nicolas Pitre
The nr argument is typically small: most often nr == 1. However this could be abused with a very large explicit scroll in a resized screen. Make the code scroll lines one at a time in all cases to avoid the VLA. Anything smarter is most likely not warranted here. Requested-by: Kees Cook Signed-of