libbsd: Branch 'master' - 2 commits

Guillem Jover guillem at kemper.freedesktop.org
Sun Jul 16 23:08:29 UTC 2017


 configure.ac       |    2 +-
 src/setproctitle.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit bbf90ac3cd55ee5b19b18bc445a066114d6ddfa4
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon Jul 17 01:01:13 2017 +0200

    Release libbsd 0.8.6

diff --git a/configure.ac b/configure.ac
index 6c6c8ce..c909878 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
 
 LIBBSD_ABI_MAJOR=0
 LIBBSD_ABI_MINOR=8
-LIBBSD_ABI_PATCH=5
+LIBBSD_ABI_PATCH=6
 
 LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
 AC_SUBST([LIBBSD_ABI])
commit 2a8514d8a5708c2c42c5b1f9fd20bb88e71ef880
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon Jul 17 00:57:07 2017 +0200

    Fix handling of non-contiguous argv + envp in setproctitle()
    
    The two arrays might not reference contiguous memory, and assuming they
    are does break at least now on GNU/Hurd, which contains an unmapped
    memory block between the memory used by the two arrays.
    
    Just check that each element is strictly after the previous one, so that
    we know there are no unmapped memory blocks inbetween.

diff --git a/src/setproctitle.c b/src/setproctitle.c
index c18c61c..038ac7d 100644
--- a/src/setproctitle.c
+++ b/src/setproctitle.c
@@ -173,14 +173,14 @@ setproctitle_init(int argc, char *argv[], char *envp[])
 	end = nul + 1;
 
 	for (i = 0; i < argc || (i >= argc && argv[i]); i++) {
-		if (argv[i] == NULL || argv[i] < end)
+		if (argv[i] == NULL || argv[i] != end)
 			continue;
 
 		end = argv[i] + strlen(argv[i]) + 1;
 	}
 
 	for (i = 0; envp[i]; i++) {
-		if (envp[i] < end)
+		if (envp[i] != end)
 			continue;
 
 		end = envp[i] + strlen(envp[i]) + 1;


More information about the libbsd mailing list