mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-29 01:56:44 +02:00
Fix an edge case when obtaining home directory.
Make the path to home directory empty before calling get_home_dir(), otherwise if the call fails, the contents are undefined.
This commit is contained in:
@ -67,6 +67,7 @@ void get_home_dir(char *home, int size)
|
||||
char *get_user_config_dir(void)
|
||||
{
|
||||
char home[NSS_BUFLEN_PASSWD];
|
||||
home[0] = '\0';
|
||||
get_home_dir(home, sizeof(home));
|
||||
|
||||
char *user_config_dir;
|
||||
|
Reference in New Issue
Block a user