From 727c46591143747f91438d1c84f44a2dffdfce78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 1 Jan 2023 14:39:38 +0100 Subject: [PATCH] core: check that buffer is not NULL in function gui_input_clipboard_copy --- src/gui/gui-input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 387aa72cb..1b54dbb6a 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -283,7 +283,7 @@ gui_input_insert_string (struct t_gui_buffer *buffer, const char *string) void gui_input_clipboard_copy (const char *buffer, int size) { - if (size <= 0) + if (!buffer || (size <= 0)) return; if (gui_input_clipboard != NULL) @@ -913,7 +913,6 @@ gui_input_delete_next_word (struct t_gui_buffer *buffer) 1); /* stop completion */ } - /* * Deletes all from cursor pos to beginning of line (default key: ctrl-U). */