]> git.deb.at Git - pkg/abook.git/commitdiff
Fix SIGSEGV with undefined USER environment variable
authorDenis Briand <debian@denis-briand.fr>
Fri, 4 Aug 2017 23:45:23 +0000 (01:45 +0200)
committerDenis Briand <debian@denis-briand.fr>
Fri, 4 Aug 2017 23:45:23 +0000 (01:45 +0200)
debian/changelog
debian/patches/859407.diff [new file with mode: 0644]
debian/patches/series

index ac76bcce97a77fbe31c43070cf3998e4f2323521..d337ce82302e684a18a4a82db20a09e44799c52e 100644 (file)
@@ -1,6 +1,7 @@
 abook (0.6.1-2) UNRELEASED; urgency=low
 
   * Bump standards version to 4.0.0
+  * Fix SIGSEGV with undefined USER environment variable (Closes: #859407). 
 
  -- Denis Briand <debian@denis-briand.fr>  Fri, 04 Aug 2017 23:26:23 +0200
 
diff --git a/debian/patches/859407.diff b/debian/patches/859407.diff
new file mode 100644 (file)
index 0000000..a589cdb
--- /dev/null
@@ -0,0 +1,18 @@
+Author: Denis Briand <debian@denis-briand.fr>
+Bug-Debian: https://bugs.debian.org/859407
+Description: if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam
+
+--- a/filter.c
++++ b/filter.c
+@@ -186,6 +186,11 @@
+       int rtn;
+       char *tmp;
++      //if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam
++      if (!username) {
++          username = "nobody";
++       }
++
+       pwent = getpwnam(username);
+       if((tmp = xstrdup(pwent->pw_gecos)) == NULL)
index c905432fb39f33ed24ee14be1e34e7644ac4e028..c8c0863f23d4a98448424c9af0895ec518f49dac 100644 (file)
@@ -1 +1,2 @@
+859407.diff
 fix_spelling_error_in_binary.diff