ui: avoid dynamic stack allocations
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ui/spice-display: Avoid dynamic stack allocationui/ | +2 | 1 reply | |
| 2/3 | ui/vnc-enc-hextile: Use static rather than dynamic length stack arrayui/ | +7 | 2 replies | |
| 3/3 | ui/vnc-enc-tight: Avoid dynamic stack allocationui/ | +6 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé | Francisco Iglesias |
|---|---|---|
| 1/3 | R-b | |
| 2/3 | R-b | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] ui: avoid dynamic stack allocations
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).
This patchset fixes some places in the spice and vnc UI frontends that were doing on-stack allocations. For the vnc-enc-hextile case we can make the array fixed size; for the other two places we switch to a heap allocation.
Disclaimer: tested only with compile + make check, which doesn't actually exercise the UI frontends.
thanks
-- PMM
Peter Maydell (2):
ui/spice-display: Avoid dynamic stack allocation ui/vnc-enc-hextile: Use static rather than dynamic length stack array
Philippe Mathieu-Daudé (1):
ui/vnc-enc-tight: Avoid dynamic stack allocation
ui/vnc-enc-hextile-template.h | 8 +++++++- ui/spice-display.c | 3 ++- ui/vnc-enc-tight.c | 11 ++++++----- 3 files changed, 15 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1