projects
/
hashcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a3b610
)
fix get_path_exe: not sure what I was thinking
author
Nikolai Lifanov
<lifanov@mail.lifanov.com>
Wed, 6 Jul 2016 14:20:46 +0000
(10:20 -0400)
committer
Nikolai Lifanov
<lifanov@mail.lifanov.com>
Wed, 6 Jul 2016 14:20:46 +0000
(10:20 -0400)
src/shared.c
patch
|
blob
|
history
diff --git
a/src/shared.c
b/src/shared.c
index
5033dae
..
5372561
100644
(file)
--- a/
src/shared.c
+++ b/
src/shared.c
@@
-4386,9
+4386,12
@@
char *get_exec_path ()
mib[2] = KERN_PROC_PATHNAME;
mib[3] = -1;
- size_t size = sizeof(exec_path);
+ char tmp[32] = { 0 };
+
+ size_t size = exec_path_len;
+ sysctl(mib, 4, exec_path, &size, NULL, 0);
- const int len = sysctl(mib, 4, exec_path, &size, NULL, 0);
+ const int len = readlink (tmp, exec_path, exec_path_len - 1);
#else
#error Your Operating System is not supported or detected