]> git.deb.at Git - pkg/abook.git/blob - 859407.diff
a589cdb4be54ffbed936ea288d9efd0f29163af2
[pkg/abook.git] / 859407.diff
1 Author: Denis Briand <debian@denis-briand.fr>
2 Bug-Debian: https://bugs.debian.org/859407
3 Description: if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam
4
5 --- a/filter.c
6 +++ b/filter.c
7 @@ -186,6 +186,11 @@
8         int rtn;
9         char *tmp;
10  
11 +       //if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam
12 +       if (!username) {
13 +          username = "nobody";
14 +       }
15 +
16         pwent = getpwnam(username);
17  
18         if((tmp = xstrdup(pwent->pw_gecos)) == NULL)