From eaa7e087abc3d3338b82910a31346eb26533b004 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 18 Jan 2016 12:38:30 +0100 Subject: [PATCH] don't toString an empty dnsname --- pdns/lua-auth.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdns/lua-auth.cc b/pdns/lua-auth.cc index e3a557653..2df1e9cda 100644 --- a/pdns/lua-auth.cc +++ b/pdns/lua-auth.cc @@ -163,7 +163,10 @@ static int ldp_getQuestion(lua_State *L) { static int ldp_getWild(lua_State *L) { DNSPacket *p=ldp_checkDNSPacket(L); - lua_pushstring(L, p->qdomainwild.toString().c_str()); + if(p->qdomainwild.empty()) + lua_pushnil(L); + else + lua_pushstring(L, p->qdomainwild.toString().c_str()); return 1; } -- 2.40.0