mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
Remove all sprintf calls
Replace them with snprintf, which ensures buffer overflows won't happen.
This commit is contained in:
parent
ac7892371c
commit
f707f583e1
4 changed files with 7 additions and 6 deletions
|
|
@ -1706,7 +1706,7 @@ static void update_marks_texture(struct sway_container *con,
|
|||
for (int i = 0; i < con->marks->length; ++i) {
|
||||
char *mark = con->marks->items[i];
|
||||
if (mark[0] != '_') {
|
||||
sprintf(part, "[%s]", mark);
|
||||
snprintf(part, len + 1, "[%s]", mark);
|
||||
strcat(buffer, part);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue