mirror of
https://github.com/tmux/tmux.git
synced 2025-09-05 08:07:03 +00:00
Don't dereference NULL if buf winds up being empty. Can't happen
right now according to NicM but better safe than sorry. OK nicm@
This commit is contained in:
@ -45,6 +45,7 @@ attributes_tostring(u_char ch)
|
|||||||
strlcat(buf, "hidden,", sizeof (buf));
|
strlcat(buf, "hidden,", sizeof (buf));
|
||||||
if (ch & GRID_ATTR_ITALICS)
|
if (ch & GRID_ATTR_ITALICS)
|
||||||
strlcat(buf, "italics,", sizeof (buf));
|
strlcat(buf, "italics,", sizeof (buf));
|
||||||
|
if (*buf)
|
||||||
*(strrchr(buf, ',')) = '\0';
|
*(strrchr(buf, ',')) = '\0';
|
||||||
|
|
||||||
return (buf);
|
return (buf);
|
||||||
|
Reference in New Issue
Block a user