[Buildroot] [PATCH v2 1/1] package/libfreeglut: bump version to 3.6.0
Fiona Klute
fiona.klute at gmx.de
Sat Oct 4 19:46:14 UTC 2025
Hi Bernd,
thanks for the patch! Would you mind also adding this upstream patch to
fix the build with CMake 4.x?
https://github.com/freeglut/freeglut/commit/2294389397912c9a6505a88221abb7dca0a4fb79
I sent a patch a while ago [1] to add an override in
LIBFREEGLUT_CONF_OPTS, but using the upstream patch is obviously nicer,
and with 3.6.0 it should apply cleanly.
Best regards,
Fiona
[1]
https://patchwork.ozlabs.org/project/buildroot/patch/20250901173438.3769632-1-fiona.klute@gmx.de/
Am 04.10.25 um 14:18 schrieb Bernd Kuhls:
> Removed patch 0001 which is included in this release, renumbered
> remaining patch.
>
> Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
> ---
> v2: re-added and renumbered remaining patch
>
> ...-memory-leak-that-happens-upon-error.patch | 54 -------------------
> ...ormDestroyContext-prototype-for-C23.patch} | 0
> package/libfreeglut/libfreeglut.hash | 2 +-
> package/libfreeglut/libfreeglut.mk | 2 +-
> 4 files changed, 2 insertions(+), 56 deletions(-)
> delete mode 100644 package/libfreeglut/0001-Plug-memory-leak-that-happens-upon-error.patch
> rename package/libfreeglut/{0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch => 0001-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch} (100%)
>
> diff --git a/package/libfreeglut/0001-Plug-memory-leak-that-happens-upon-error.patch b/package/libfreeglut/0001-Plug-memory-leak-that-happens-upon-error.patch
> deleted file mode 100644
> index d09e9befb3..0000000000
> --- a/package/libfreeglut/0001-Plug-memory-leak-that-happens-upon-error.patch
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -From 9ad320c1ad1a25558998ddfe47674511567fec57 Mon Sep 17 00:00:00 2001
> -From: Sebastian Rasmussen <sebras at 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 at 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
> -
> diff --git a/package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch b/package/libfreeglut/0001-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch
> similarity index 100%
> rename from package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch
> rename to package/libfreeglut/0001-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch
> diff --git a/package/libfreeglut/libfreeglut.hash b/package/libfreeglut/libfreeglut.hash
> index 249a780f04..233fa55457 100644
> --- a/package/libfreeglut/libfreeglut.hash
> +++ b/package/libfreeglut/libfreeglut.hash
> @@ -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
> diff --git a/package/libfreeglut/libfreeglut.mk b/package/libfreeglut/libfreeglut.mk
> index 09309aeceb..bcca8b4abe 100644
> --- a/package/libfreeglut/libfreeglut.mk
> +++ b/package/libfreeglut/libfreeglut.mk
> @@ -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
More information about the buildroot
mailing list