Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

lua Fix potential event stack OVFL

you could return values in the event callbacks that would never be processed
this would eventually cause a lua stack overflow

settop(0) eats all return values (if any)

Change-Id: Icac6b27e592b385421275d4bd899ed3fe1065669

+3 -1
+3 -1
apps/plugins/lua/rocklib_events.c
··· 253 253 lua_pushlightuserdata(L, evt->data); 254 254 255 255 lua_status = lua_resume(L, 2); /* call the saved function */ 256 - if (lua_status == LUA_YIELD) /* coroutine.yield() disallowed */ 256 + if (lua_status == LUA_SUCCESS) 257 + lua_settop(L, 0); /* eat any value(s) returned */ 258 + else if (lua_status == LUA_YIELD) /* coroutine.yield() disallowed */ 257 259 luaL_where(L, 1); /* push error string on stack */ 258 260 259 261 return lua_status;