lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 189378142a70398ad538af66b62430bc9ea3c645
parent 82749b765e1fa657b7d68c64426428951db066d8
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 17 Feb 2009 11:30:52 -0300

buffer creation ensures buffer space plus MINSTACK in the stack

Diffstat:
Mlauxlib.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lauxlib.c b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.179 2008/07/03 14:21:41 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.180 2009/02/13 19:39:34 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -355,6 +355,7 @@ LUALIB_API void luaL_addvalue (luaL_Buffer *B) { LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { + luaL_checkstack(L, LIMIT + LUA_MINSTACK, "no space for new buffer"); B->L = L; B->p = B->buffer; B->lvl = 0;