sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 85a5c8dabd2561dfe616bea50faf2549e8cb345e
parent af87c7a1af8d790b819afe782fcff2830e959d58
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Sat,  2 Jun 2018 08:05:43 -0400

Fix infinite loop in peek_line for EOF blanks

Diffstat:
Mcommon/readline.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/common/readline.c b/common/readline.c @@ -56,6 +56,8 @@ char *peek_line(FILE *file, int line_offset, long *position) { for (int i = 0; i <= line_offset; i++) { ssize_t read = getline(&line, &length, file); if (read < 0) { + free(line); + line = NULL; break; } if (read > 0 && line[read - 1] == '\n') {