swayfx/swaynag
Peter Grayson 79369681ab Repair swaynag crash reading message from stdin
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()).
2019-03-11 23:00:39 -04:00
..
config.c Repair swaynag crash reading message from stdin 2019-03-11 23:00:39 -04:00
main.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
meson.build Removed unused wlroots dependency for sway(bg|bar|msg|nag) 2019-01-21 13:04:15 -05:00
render.c Fix dead stores found by scan-build 2019-01-22 10:12:04 -05:00
swaynag.1.scd Implement swaynag -B/--button-no-terminal 2018-11-27 23:34:51 -05:00
swaynag.5.scd swaynag: add blank lines after headings in scdocs 2018-08-01 22:47:54 -04:00
swaynag.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
types.c Cleanup list code 2018-12-09 01:15:38 +00:00