git: c862f8710d55 - main - games/teeworlds: apply patch for CVE-2021-43518
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Mar 2022 12:16:06 UTC
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=c862f8710d55eeda971db339a5ab422a16084b94 commit c862f8710d55eeda971db339a5ab422a16084b94 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2022-03-10 12:14:32 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-03-10 12:14:32 +0000 games/teeworlds: apply patch for CVE-2021-43518 Security: CVE-2021-43518 Security: 5aaf534c-a069-11ec-acdc-14dae9d5a9d2 --- games/teeworlds/Makefile | 2 +- games/teeworlds/files/patch-CVE-2021-43518 | 42 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/games/teeworlds/Makefile b/games/teeworlds/Makefile index 334ce2ee286e..822217270989 100644 --- a/games/teeworlds/Makefile +++ b/games/teeworlds/Makefile @@ -1,6 +1,6 @@ PORTNAME= teeworlds PORTVERSION= 0.7.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MAINTAINER= amdmi3@FreeBSD.org diff --git a/games/teeworlds/files/patch-CVE-2021-43518 b/games/teeworlds/files/patch-CVE-2021-43518 new file mode 100644 index 000000000000..b7cd56cd9e69 --- /dev/null +++ b/games/teeworlds/files/patch-CVE-2021-43518 @@ -0,0 +1,42 @@ +commit 91e5492d4c210f82f1ca6b43a73417fef5463368 +Author: Robert Müller <robert.mueller@uni-siegen.de> +Date: Sat Jan 15 17:36:39 2022 +0100 + + hotfix CVE-2021-43518 + +diff --git src/game/client/components/maplayers.cpp src/game/client/components/maplayers.cpp +index 24d09509..bbaaa821 100644 +--- src/game/client/components/maplayers.cpp ++++ src/game/client/components/maplayers.cpp +@@ -175,7 +175,7 @@ void CMapLayers::LoadEnvPoints(const CLayers *pLayers, array<CEnvPoint>& lEnvPoi + p.m_Time = pEnvPoint_v1->m_Time; + p.m_Curvetype = pEnvPoint_v1->m_Curvetype; + +- for(int c = 0; c < pItem->m_Channels; c++) ++ for(int c = 0; c < minimum(pItem->m_Channels, 4); c++) + { + p.m_aValues[c] = pEnvPoint_v1->m_aValues[c]; + p.m_aInTangentdx[c] = 0; +diff --git src/game/editor/io.cpp src/game/editor/io.cpp +index 160bb1c6..2bedb06e 100644 +--- src/game/editor/io.cpp ++++ src/game/editor/io.cpp +@@ -479,7 +479,8 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag + for(int e = 0; e < Num; e++) + { + CMapItemEnvelope *pItem = (CMapItemEnvelope *)DataFile.GetItem(Start+e, 0, 0); +- CEnvelope *pEnv = new CEnvelope(pItem->m_Channels); ++ const int Channels = minimum(pItem->m_Channels, 4); ++ CEnvelope *pEnv = new CEnvelope(Channels); + pEnv->m_lPoints.set_size(pItem->m_NumPoints); + for(int n = 0; n < pItem->m_NumPoints; n++) + { +@@ -496,7 +497,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag + pEnv->m_lPoints[n].m_Time = pEnvPoint_v1->m_Time; + pEnv->m_lPoints[n].m_Curvetype = pEnvPoint_v1->m_Curvetype; + +- for(int c = 0; c < pItem->m_Channels; c++) ++ for(int c = 0; c < Channels; c++) + { + pEnv->m_lPoints[n].m_aValues[c] = pEnvPoint_v1->m_aValues[c]; + }