1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

core, plugins: check that string parameters are not NULL in search functions (issue #1872)

This commit is contained in:
Sébastien Helleu
2023-01-27 20:47:24 +01:00
parent c9ac4fef4b
commit c07cf691ad
40 changed files with 127 additions and 33 deletions
+6
View File
@@ -67,6 +67,9 @@ script_language_search (const char *language)
{
int i;
if (!language)
return -1;
for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++)
{
if (strcmp (script_language[i], language) == 0)
@@ -88,6 +91,9 @@ script_language_search_by_extension (const char *extension)
{
int i;
if (!extension)
return -1;
for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++)
{
if (strcmp (script_extension[i], extension) == 0)