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:
+4
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user