No errors in 'luaO_pushvfstring'

Any call to 'va_start' must have a corresponding call to 'va_end';
so, functions called between them (luaO_pushvfstring in particular)
cannot raise errors.
This commit is contained in:
Roberto Ierusalimschy
2024-09-20 15:56:39 -03:00
parent 70d6975018
commit 20d42ccaae
5 changed files with 45 additions and 24 deletions

2
lapi.c
View File

@@ -587,6 +587,8 @@ LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) {
ret = luaO_pushvfstring(L, fmt, argp);
va_end(argp);
luaC_checkGC(L);
if (ret == NULL) /* error? */
luaD_throw(L, LUA_ERRMEM);
lua_unlock(L);
return ret;
}