mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-10 08:21:03 -04:00
tools: fix compiler error on older compilers
COLS could be very small and the statusbar array might overflow with strcpy and strcat. Also initializing the variable array seems to cause problems on older compilers. Instead use a fixed array that is big enough to hold all possible values we write into it.
This commit is contained in:
parent
1ed1349e7c
commit
b1a9bc966b
1 changed files with 2 additions and 1 deletions
|
|
@ -581,7 +581,8 @@ static void do_refresh(struct data *d, bool force_refresh)
|
|||
return;
|
||||
|
||||
if (!d->batch_mode) {
|
||||
char statusbar[COLS] = {};
|
||||
char statusbar[255] = { 0 };
|
||||
|
||||
if (!((filter->state == PW_NODE_STATE_ERROR) &&
|
||||
(filter->followers == PW_NODE_STATE_ERROR))) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue