summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-18 11:08:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-18 11:08:08 +0200
commit6095a0fe409f5190fdf741b6b3ab02daa7e2e69c (patch)
tree57c9437f3d07043ff610490416e110f8aff13b90 /src
parent8d838e89eeecc34ad54547ebf198ff5d40ec29dc (diff)
downloadweechat-6095a0fe409f5190fdf741b6b3ab02daa7e2e69c.zip
alias: return NULL if alias or user arguments are NULL in function alias_replace_args
Diffstat (limited to 'src')
-rw-r--r--src/plugins/alias/alias.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index 4971e3c6f..75dd5659b 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -227,6 +227,9 @@ alias_replace_args (const char *alias_args, const char *user_args)
const char *start, *pos;
int n, m, argc, length_res, args_count, offset;
+ if (!alias_args || !user_args)
+ return NULL;
+
argv = weechat_string_split (user_args, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT