From: Fredrik Tolf Date: Thu, 7 Oct 2010 07:48:28 +0000 (+0200) Subject: htextauth: Fixed segfault. X-Git-Tag: 0.3~7 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=b4fda020a4507a33abc22f7678288e2f92db3a4e htextauth: Fixed segfault. --- diff --git a/src/htextauth.c b/src/htextauth.c index 27217e0..f20c776 100644 --- a/src/htextauth.c +++ b/src/htextauth.c @@ -147,11 +147,11 @@ static void serve(struct hthead *req, int fd) size_t declen; now = time(NULL); + dec = NULL; if(reqssl && (((raw = getheader(req, "X-Ash-Protocol")) == NULL) || strcmp(raw, "https"))) { simpleerror(fd, 403, "Forbidden", "The requested resource must be requested over HTTPS."); goto out; } - dec = NULL; if(((raw = getheader(req, "Authorization")) == NULL) || strncasecmp(raw, "basic ", 6)) { reqauth(req, fd); goto out;