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
const salt_t *s1 = h1->salt;
const salt_t *s2 = h2->salt;
- // 16 - 2 (since last 2 uints contain the digest)
- uint n = 14;
+ // last 2: salt_buf[10] and salt_buf[11] contain the digest (skip them)
+
+ uint n = 9; // 9 * 4 = 36 bytes (max length of ESSID)
while (n--)
{