aboutsummaryrefslogtreecommitdiff
path: root/scripts/modules/module_block.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-01-25 17:32:10 +0000
committerPeter Maydell <peter.maydell@linaro.org>2024-02-02 13:51:58 +0000
commitcabe58b0f8542d5c3dd1eca0b4def50bee1ffab4 (patch)
tree297f93379cbe25cacba345d4733f5b2235c39777 /scripts/modules/module_block.py
parent9f2e8ac0900fd5645f6a5f38ca0fc751fa602f45 (diff)
downloadqemu-cabe58b0f8542d5c3dd1eca0b4def50bee1ffab4.zip
qemu-cabe58b0f8542d5c3dd1eca0b4def50bee1ffab4.tar.gz
qemu-cabe58b0f8542d5c3dd1eca0b4def50bee1ffab4.tar.bz2
tests/qtest/xlnx-versal-trng-test.c: Drop use of variable length array
This test program is the last use of any variable length array in the codebase. If we can get rid of all uses of VLAs 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). In this case the test code didn't even want a variable-sized array, it was just accidentally using syntax that gave it one. (The array size for C has to be an actual constant expression, not just something that happens to be known to be constant...) Remove the VLA usage. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-id: 20240125173211.1786196-2-peter.maydell@linaro.org
Diffstat (limited to 'scripts/modules/module_block.py')
0 files changed, 0 insertions, 0 deletions