From e3b43089d8f99b54f7e98b0e42f5ac2c65b6f9c6 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Thu, 20 Feb 2014 11:47:47 +0000 Subject: [PATCH] mod_lua: Slight null-check fix on setcookie. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570156 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index f2fa055cde..e9af3bd937 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -2043,12 +2043,12 @@ static int lua_set_cookie(lua_State *L) } /* Create path segment */ - if (path && strlen(path) > 0) { + if (path != NULL && strlen(path) > 0) { strpath = apr_psprintf(r->pool, "Path=\"%s\";", path); } /* Create domain segment */ - if (domain && strlen(domain) > 0) { + if (domain != NULL && strlen(domain) > 0) { /* Domain does NOT like quotes in most browsers, so let's avoid that */ strdomain = apr_psprintf(r->pool, "Domain=%s;", domain); }