1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: check that parameters are not NULL in URL functions

This commit is contained in:
Sébastien Helleu
2023-03-12 07:58:00 +01:00
parent a5aa3304a4
commit e36eda5404
+4 -1
View File
@@ -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,