package/libfreeglut: bump version to 3.6.0
For release notes, see: https://github.com/freeglut/freeglut/releases/tag/v3.6.0 Removed patch 0001 which is included in this release, renumbered remaining patch. Added upstream commit to fix build with CMake 4.x. Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Tested-by: Fiona Klute (WIWA) <fiona.klute@gmx.de> [Julien: add link to release notes] Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
d178055544
commit
b1c77090ef
@@ -1,54 +0,0 @@
|
||||
From 9ad320c1ad1a25558998ddfe47674511567fec57 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Rasmussen <sebras@gmail.com>
|
||||
Date: Mon, 12 Feb 2024 14:46:22 +0800
|
||||
Subject: [PATCH] Plug memory leak that happens upon error.
|
||||
|
||||
If fgStructure.CurrentMenu is set when glutAddMenuEntry() or
|
||||
glutAddSubMenu() is called the allocated menuEntry variable will
|
||||
leak. This commit postpones allocating menuEntry until after the
|
||||
error checks, thereby plugging the memory leak.
|
||||
|
||||
This fixes CVE-2024-24258 and CVE-2024-24259.
|
||||
Upstream: https://github.com/freeglut/freeglut/commit/9ad320c1ad1a25558998ddfe47674511567fec57
|
||||
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
|
||||
---
|
||||
src/fg_menu.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/fg_menu.c b/src/fg_menu.c
|
||||
index 53112dc2..0da88901 100644
|
||||
--- a/src/fg_menu.c
|
||||
+++ b/src/fg_menu.c
|
||||
@@ -864,12 +864,12 @@ void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry;
|
||||
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutAddMenuEntry" );
|
||||
- menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
|
||||
|
||||
freeglut_return_if_fail( fgStructure.CurrentMenu );
|
||||
if (fgState.ActiveMenus)
|
||||
fgError("Menu manipulation not allowed while menus in use.");
|
||||
|
||||
+ menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
|
||||
menuEntry->Text = strdup( label );
|
||||
menuEntry->ID = value;
|
||||
|
||||
@@ -888,7 +888,6 @@ void FGAPIENTRY glutAddSubMenu( const char *label, int subMenuID )
|
||||
SFG_Menu *subMenu;
|
||||
|
||||
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutAddSubMenu" );
|
||||
- menuEntry = ( SFG_MenuEntry * )calloc( sizeof( SFG_MenuEntry ), 1 );
|
||||
subMenu = fgMenuByID( subMenuID );
|
||||
|
||||
freeglut_return_if_fail( fgStructure.CurrentMenu );
|
||||
@@ -897,6 +896,7 @@ void FGAPIENTRY glutAddSubMenu( const char *label, int subMenuID )
|
||||
|
||||
freeglut_return_if_fail( subMenu );
|
||||
|
||||
+ menuEntry = ( SFG_MenuEntry * )calloc( sizeof( SFG_MenuEntry ), 1 );
|
||||
menuEntry->Text = strdup( label );
|
||||
menuEntry->SubMenu = subMenu;
|
||||
menuEntry->ID = -1;
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 2294389397912c9a6505a88221abb7dca0a4fb79 Mon Sep 17 00:00:00 2001
|
||||
From: John Tsiombikas <nuclear@member.fsf.org>
|
||||
Date: Thu, 20 Mar 2025 09:28:29 +0200
|
||||
Subject: [PATCH] Let cmake know we are aware there are newer versions and we
|
||||
don't care
|
||||
|
||||
Closes issue #207
|
||||
|
||||
Upstream: https://github.com/freeglut/freeglut/commit/2294389397912c9a6505a88221abb7dca0a4fb79
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
[Bernd: rebased for version 3.6.0]
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 791771e7..e5903ef4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 3.1...3.5 FATAL_ERROR)
|
||||
PROJECT(freeglut LANGUAGES C)
|
||||
|
||||
if (POLICY CMP0072)
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 3c0bcb915d9b180a97edaebd011b7a1de54583a838644dcd42bb0ea0c6f3eaec freeglut-3.4.0.tar.gz
|
||||
sha256 9c3d4d6516fbfa0280edc93c77698fb7303e443c1aaaf37d269e3288a6c3ea52 freeglut-3.6.0.tar.gz
|
||||
sha256 b6593d5ec4c113a274abb85b10e8615895cb0ddb89f7912af5fe5aa8df38a275 COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBFREEGLUT_VERSION = 3.4.0
|
||||
LIBFREEGLUT_VERSION = 3.6.0
|
||||
LIBFREEGLUT_SOURCE = freeglut-$(LIBFREEGLUT_VERSION).tar.gz
|
||||
LIBFREEGLUT_SITE = https://github.com/FreeGLUTProject/freeglut/releases/download/v$(LIBFREEGLUT_VERSION)
|
||||
LIBFREEGLUT_LICENSE = MIT
|
||||
|
||||
Reference in New Issue
Block a user