aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-02-28 16:26:47 +0000
committerStefan Bühler <stbuehler@web.de>2009-02-28 16:26:47 +0000
commit776c5294f08535f8c45cfd0e0df9e09712d83cae (patch)
tree05ebd1ee1dbebaad9127fac764f71d6e05fbd371
parent1f3a8a610e26b92f9c244a32b36dd84c380add07 (diff)
downloadspawn-fcgi-776c5294f08535f8c45cfd0e0df9e09712d83cae.tar.gz
spawn-fcgi-776c5294f08535f8c45cfd0e0df9e09712d83cae.zip
Fix segfault due to uninitialized varv1.6.0
git-svn-id: svn://svn.lighttpd.net/spawn-fcgi/trunk@25 4a9f3682-ca7b-49a8-9a55-ba4640e46f83
-rw-r--r--NEWS1
-rw-r--r--src/spawn-fcgi.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 7a43fcd..5a8ffa6 100644
--- a/NEWS
+++ b/NEWS
@@ -15,3 +15,4 @@ NEWS
* Fix error handling for unix-socket-connect test
* Man page update
* Use header include order from 1.4.x
+ * Fix segfault due to uninitialized var
diff --git a/src/spawn-fcgi.c b/src/spawn-fcgi.c
index 3fc243f..02f32a1 100644
--- a/src/spawn-fcgi.c
+++ b/src/spawn-fcgi.c
@@ -276,8 +276,8 @@ static int fcgi_spawn_connection(char *appPath, char **appArgv, char *addr, unsi
static int find_user_group(const char *user, const char *group, uid_t *uid, gid_t *gid, const char **username) {
uid_t my_uid = 0;
gid_t my_gid = 0;
- struct passwd *my_pwd;
- struct group *my_grp;
+ struct passwd *my_pwd = NULL;
+ struct group *my_grp = NULL;
*uid = 0; *gid = 0;
if (username) *username = NULL;