ui/curses: Avoid dynamic stack allocation
Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220819153931.3147384-11-peter.maydell@linaro.org
This commit is contained in:
parent
29d81e429d
commit
2d5f4a713d
@ -69,7 +69,7 @@ static void curses_update(DisplayChangeListener *dcl,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
console_ch_t *line;
|
||||
cchar_t curses_line[width];
|
||||
g_autofree cchar_t *curses_line = g_new(cchar_t, width);
|
||||
wchar_t wch[CCHARW_MAX];
|
||||
attr_t attrs;
|
||||
short colors;
|
||||
|
Loading…
Reference in New Issue
Block a user