mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: check that directory is not NULL in function plugin_api_info_absolute_path
This commit is contained in:
@@ -197,7 +197,7 @@ plugin_api_info_absolute_path (const char *directory)
|
||||
{
|
||||
char absolute_path[PATH_MAX];
|
||||
|
||||
if (!realpath (directory, absolute_path))
|
||||
if (!directory || !realpath (directory, absolute_path))
|
||||
return NULL;
|
||||
return strdup ((absolute_path[0]) ? absolute_path : directory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user