diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-12 07:58:00 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-12 07:58:00 +0100 |
commit | e36eda540444910e297e577c793a801d1c9ccafc (patch) | |
tree | e75f1783b4d6977d5082d8dcbe3b2f988a08df13 /src | |
parent | a5aa3304a48d321956dad4700b7363e8be2904a4 (diff) | |
download | weechat-e36eda540444910e297e577c793a801d1c9ccafc.zip |
core: check that parameters are not NULL in URL functions
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-url.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/wee-url.c b/src/core/wee-url.c index b0d19a340..d3a086b88 100644 --- a/src/core/wee-url.c +++ b/src/core/wee-url.c @@ -1027,7 +1027,7 @@ weeurl_search_constant (struct t_url_constant *constants, const char *name) { int i; - if (!name) + if (!constants || !name) return -1; for (i = 0; constants[i].name; i++) @@ -1056,6 +1056,9 @@ weeurl_get_mask_value (struct t_url_constant *constants, int num_items, i, index; long mask; + if (!constants || !string_mask) + return 0; + mask = 0; items = string_split (string_mask, "+", NULL, |