From: Peter van Dijk Date: Mon, 18 Jan 2016 11:38:30 +0000 (+0100) Subject: don't toString an empty dnsname X-Git-Tag: dnsdist-1.0.0-alpha2~55^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3258%2Fhead;p=thirdparty%2Fpdns.git don't toString an empty dnsname --- diff --git a/pdns/lua-auth.cc b/pdns/lua-auth.cc index e3a557653d..2df1e9cda0 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; }