From aa15629f17d65d45c02c30b6392e74d752b520b3 Mon Sep 17 00:00:00 2001 From: Dan Robertson Date: Sun, 11 Feb 2018 03:55:45 +0000 Subject: Fix memory errors - read_line: OOB write when a line in /proc/modules contains a terminating character at size position. - handle_view_created: Ensure that the list_t returned by criteria_for is free'd after use - ipc_event_binding_keyboard/ipc_event_binding: Properly handle json_object reference counting and ownership. --- common/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/readline.c') diff --git a/common/readline.c b/common/readline.c index cc40a2cc..d35ba73e 100644 --- a/common/readline.c +++ b/common/readline.c @@ -36,7 +36,7 @@ char *read_line(FILE *file) { } string[length++] = c; } - if (length + 1 == size) { + if (length + 1 >= size) { char *new_string = realloc(string, length + 1); if (!new_string) { free(string); -- cgit v1.2.3-54-g00ecf