brimworks/lua-zlib — pull request #7 by zorbathut (2012-10-23 19:50:44+00:00)
Title: Fix crash when calling zlib.deflate()()

It looks like zlib.deflate()() is intended to be equivalent to zlib.deflate()("", "finish"), but lua_tolstring was potentially accessing an invalid stack element, which could cause crashes. This fixes it by checking to ensure the stack element is valid before the access.