Age | Commit message (Collapse) | Author |
|
When swaynag is run with the -l/--detailed-message option, a crash may
occur if the detailed message read from stdin is large enough. E.g.:
swaynag -m hello -l < ~/.config/sway/config
The root cause is that the read_from_stdin() function under-allocates
memory for the destination buffer which causes that buffer to be overflowed
when copying line data to it with snprintf().
The repair is to allocate one more byte for the terminating null byte.
N.B. although getline() returns the number of bytes read excluding a
terminating null byte, the line buffer is terminated with a null byte. Thus
we have a guarantee that the line buffer will be null terminated (which is
important when copying with snprintf()).
|
|
Now that swaynag uses getline (instead of the old readline), the
trailing newline characters have to be removed when reading the config
|
|
|
|
|
|
|
|
Set config path to fallback instead of setting $XDG_CONFIG_HOME
|
|
All occurrences of read_line have been replaced by getline.
peek_line has been absorbed into detect_brace.
|
|
In `i3 4.16`, `i3-nagbar` introduces the flags `-B/--button-no-terminal`
to run the action directly instead of inside a terminal. This implements
the flags for swaynag for compatibility.
Since swaynag does not use an equivalent to `i3-sensible-terminal`, the
flags `-b/--button` only uses a terminal when the environment variable
`TERMINAL` is set, otherwise it acts the same as these new flags.
|
|
And make sure we don't define both in the same source file.
|
|
If they really do not take undefined number of arguments.
|
|
|
|
|
|
|
|
|
|
|