From: Daniel Gruno Date: Thu, 20 Feb 2014 11:47:47 +0000 (+0000) Subject: mod_lua: Slight null-check fix on setcookie. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d690b889a1bbc64a412603260c292e7a073a849;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index f2fa055cded..e9af3bd937f 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); }