Re: [PATCH 3/3] ui/vnc-enc-tight: Avoid dynamic stack allocation

2023-08-21 Thread Francisco Iglesias
On [2023 Aug 18] Fri 16:10:57, Peter Maydell wrote: > From: Philippe Mathieu-Daudé > > Use autofree heap allocation instead of variable-length > array on the stack. > > The codebase has very few VLAs, and if we can get rid of them all we > can make the compiler error on new additions. This is a

[PATCH 3/3] ui/vnc-enc-tight: Avoid dynamic stack allocation

2023-08-18 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic