Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/dump: Avoid variable length array
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 isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Francisco Iglesias <[email protected]> Signed-off-by: Jason Wang <[email protected]>
- Loading branch information