]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_lua: Slight null-check fix on setcookie.
authorDaniel Gruno <humbedooh@apache.org>
Thu, 20 Feb 2014 11:47:47 +0000 (11:47 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Thu, 20 Feb 2014 11:47:47 +0000 (11:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570156 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index f2fa055cdeda41cd3d2b39b21c22a288ccdfe242..e9af3bd937f8cc2e5d0f98923173e28bf71f7ebf 100644 (file)
@@ -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);
     }