Re: [PATCH 2/4] hw/net/rocker: Avoid variable length array

2023-08-25 Thread Francisco Iglesias
On [2023 Aug 24] Thu 16:32:22, Peter Maydell wrote: > Replace an on-stack variable length array in of_dpa_ig() with > a g_autofree heap allocation. > > 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 > measur

[PATCH 2/4] hw/net/rocker: Avoid variable length array

2023-08-24 Thread Peter Maydell
Replace an on-stack variable length array in of_dpa_ig() with a g_autofree heap allocation. 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 isn