gentoo-ebuilds/games-arcade/supertux/files/supertux-0.6.3-squirrel-CVE-2022-30292.patch
Pacho Ramos 866ce00a7c
games-arcade/supertux: Fix CVE-2022-30292
For 0.6.3 we need to patch the bundled squirrel copy, in next upstream
versions it should be possible to finally build it against system copy.

Bug: https://bugs.gentoo.org/843008
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
2022-12-04 15:49:22 +01:00

21 lines
861 B
Diff

From a6413aa690e0bdfef648c68693349a7b878fe60d Mon Sep 17 00:00:00 2001
From: Alberto Demichelis <albertodemichelis@hotmail.com>
Date: Mon, 2 May 2022 12:04:58 +0200
Subject: [PATCH] fix in thread.call
---
squirrel/sqbaselib.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/external/squirrel/squirrel/sqbaselib.cpp b/external/squirrel/squirrel/sqbaselib.cpp
index 8eff97c..5055f18 100644
--- a/external/squirrel/squirrel/sqbaselib.cpp
+++ b/external/squirrel/squirrel/sqbaselib.cpp
@@ -1149,6 +1149,7 @@ static SQInteger thread_call(HSQUIRRELVM v)
SQObjectPtr o = stack_get(v,1);
if(sq_type(o) == OT_THREAD) {
SQInteger nparams = sq_gettop(v);
+ sq_reservestack(_thread(o), nparams + 3);
_thread(o)->Push(_thread(o)->_roottable);
for(SQInteger i = 2; i<(nparams+1); i++)
sq_move(_thread(o),v,i);