From 6e3ef7fe09c5df6d353018f4ec2d2a76846b28c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=8E?= Date: Mon, 30 Dec 2013 19:48:30 +0800 Subject: [PATCH] bugfix: Issue #60 --- lualib-src/lua-seri.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lualib-src/lua-seri.c b/lualib-src/lua-seri.c index 23413cf5..e02c0421 100644 --- a/lualib-src/lua-seri.c +++ b/lualib-src/lua-seri.c @@ -447,6 +447,9 @@ static void _get_buffer(lua_State *L, struct read_block *rb, int len) { char tmp[len]; char * p = rb_read(rb,tmp,len); + if (p == NULL) { + _invalid_stream(L,rb); + } lua_pushlstring(L,p,len); }