From c07cf691adb4740759e9fd128a2f6702c912d70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 27 Jan 2023 20:47:24 +0100 Subject: core, plugins: check that string parameters are not NULL in search functions (issue #1872) --- src/plugins/fset/fset-option.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/fset') diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 748bce747..e6d9c0e86 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -102,6 +102,9 @@ fset_option_search_by_name (const char *name, int *line) if (line) *line = -1; + if (!name) + return NULL; + num_options = weechat_arraylist_size (fset_options); for (i = 0; i < num_options; i++) { -- cgit v1.2.3