Re: [PATCH 3/4] net/dump: Avoid variable length array

2023-08-25 Thread Francisco Iglesias
On [2023 Aug 24] Thu 16:32:23, Peter Maydell wrote: > Use a g_autofree heap allocation instead of a variable length > array in dump_receive_iov(). > > 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 >

[PATCH 3/4] net/dump: Avoid variable length array

2023-08-24 Thread Peter Maydell
Use a g_autofree heap allocation instead of a variable length array in dump_receive_iov(). 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 allocation