mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-17 21:59:06 +00:00
Add some missing returncode checks to get_exec_path()
This commit is contained in:
parent
7f1dbf5a33
commit
aa1b7408a0
@ -32,10 +32,14 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz)
|
||||
|
||||
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
||||
|
||||
if (len == -1) return -1;
|
||||
|
||||
#elif defined (_WIN)
|
||||
|
||||
const DWORD len = GetModuleFileName (NULL, exec_path, exec_path_sz - 1);
|
||||
|
||||
if (len == 0) return -1;
|
||||
|
||||
#elif defined (__APPLE__)
|
||||
|
||||
u32 size = (u32) exec_path_sz;
|
||||
@ -61,6 +65,8 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz)
|
||||
|
||||
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
||||
|
||||
if (len == -1) return -1;
|
||||
|
||||
#else
|
||||
#error Your Operating System is not supported or detected
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user