From b6899453ab84600f853e4dc62756cb764d19e74c Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Fri, 28 Mar 2014 20:43:15 +0000 Subject: [PATCH] =?utf8?q?Add=20a=20note=20on=20t->r=20checking,=20as=20pe?= =?utf8?q?r=20R=C3=BCdiger's=20email.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582881 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_apr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lua/lua_apr.c b/modules/lua/lua_apr.c index 21651ead4f..94761ba4b2 100644 --- a/modules/lua/lua_apr.c +++ b/modules/lua/lua_apr.c @@ -41,6 +41,10 @@ static int lua_table_set(lua_State *L) const char *key = luaL_checkstring(L, 2); const char *val = luaL_checkstring(L, 3); /* Unless it's the 'notes' table, check for newline chars */ + /* t->r will be NULL in case of the connection notes, but since + we aren't going to check anything called 'notes', we can safely + disregard checking whether t->r is defined. + */ if (strcmp(t->n, "notes") && ap_strchr_c(val, '\n')) { char *badchar; char *replacement = apr_pstrdup(t->r->pool, val); -- 2.50.1