mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-18 06:08:16 +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);
|
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
||||||
|
|
||||||
|
if (len == -1) return -1;
|
||||||
|
|
||||||
#elif defined (_WIN)
|
#elif defined (_WIN)
|
||||||
|
|
||||||
const DWORD len = GetModuleFileName (NULL, exec_path, exec_path_sz - 1);
|
const DWORD len = GetModuleFileName (NULL, exec_path, exec_path_sz - 1);
|
||||||
|
|
||||||
|
if (len == 0) return -1;
|
||||||
|
|
||||||
#elif defined (__APPLE__)
|
#elif defined (__APPLE__)
|
||||||
|
|
||||||
u32 size = (u32) exec_path_sz;
|
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);
|
const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1);
|
||||||
|
|
||||||
|
if (len == -1) return -1;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error Your Operating System is not supported or detected
|
#error Your Operating System is not supported or detected
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user