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
 
 
--- /dev/null
+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)