]> granicus.if.org Git - pdns/commitdiff
LuaWrapper turned out not to have been 0-byte clean when pushing std::strings from...
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 1 Feb 2016 06:29:58 +0000 (07:29 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 1 Feb 2016 06:29:58 +0000 (07:29 +0100)
ext/luawrapper/include/LuaContext.hpp

index f247eef7a8582c61ef08f2d783d105211444cba2..8efccd41b7a4dac0d5d2532d9f3aced30acce8da 100644 (file)
@@ -1849,7 +1849,7 @@ struct LuaContext::Pusher<std::string> {
     static const int maxSize = 1;
 
     static PushedObject push(lua_State* state, const std::string& value) noexcept {
-        lua_pushstring(state, value.c_str());
+        lua_pushlstring(state, value.c_str(), value.length());
         return PushedObject{state, 1};
     }
 };