X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fos_installation.c;h=035259ff6b234e1d0305044b51222fd2f4380cb1;hb=9b0414d6f98f33d7e1c33dafe105eb58da0bf79b;hp=3e0efa0bfa49402e683e9c95d5cd0616e9859a68;hpb=879338b20ccb696e38a95be328a2ad80b6a28ad0;p=oweals%2Fgnunet.git diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 3e0efa0bf..035259ff6 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -65,7 +65,7 @@ get_path_from_proc_maps () while (NULL != fgets (line, sizeof (line), f)) { if ((1 == - SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) && + SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%1023s", dir)) && (NULL != (lgu = strstr (dir, "libgnunetutil")))) { lgu[0] = '\0'; @@ -573,6 +573,8 @@ GNUNET_OS_get_libexec_binary_path (const char *progname) char *libexecdir; char *binary; + if (DIR_SEPARATOR == progname[0]) + return GNUNET_strdup (progname); libexecdir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR); if (NULL == libexecdir) return GNUNET_strdup (progname);