Fix a hang in SDL_FreeYUVOverlay() (RH#2173510)

This commit is contained in:
Petr Písař 2023-03-10 12:54:36 +01:00
parent 8403e64e48
commit dddc3d2985
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 683234e8708a081224942181710ca5dd3cee409e Mon Sep 17 00:00:00 2001
From: Sam Lantinga <slouken@libsdl.org>
Date: Thu, 17 Nov 2022 07:55:07 -0800
Subject: [PATCH] Fixed infinite loop in SDL_FreeYUVOverlay()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes https://github.com/libsdl-org/sdl12-compat/issues/275
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/SDL12_compat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 6964e2b..fb657a6 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -7535,6 +7535,7 @@ SDL_FreeYUVOverlay(SDL12_Overlay *overlay12)
if (overlay->overlay12 == overlay12) {
overlay->overlay12 = NULL; /* don't try to draw this later. */
}
+ overlay = overlay->next;
}
if (renderer) {
--
2.39.2

View File

@ -7,7 +7,7 @@
Name: sdl12-compat
Version: 1.2.60
Release: 2%{?dist}
Release: 3%{?dist}
Summary: SDL 1.2 runtime compatibility library using SDL 2.0
# mp3 decoder code is MIT-0/PD
# SDL_opengl.h is zlib and MIT
@ -20,6 +20,9 @@ Source1: SDL_config.h
# Backports from upstream (0001~0500)
## From: https://github.com/libsdl-org/sdl12-compat/commit/77892a1ef5260fe78e593c8337dbe98874ff336c
Patch0001: 0001-fix-SDL12COMPAT_MAX_VIDMODE.patch
# Fix a hang in SDL_FreeYUVOverlay(), in upstream after 1.2.60, RH#2173510,
# <https://github.com/libsdl-org/sdl12-compat/issues/275>
Patch0002: sdl12-compat-1.2.60-Fixed-infinite-loop-in-SDL_FreeYUVOverlay.patch
# Proposed patches (0501~1000)
@ -152,6 +155,9 @@ rm -rf %{buildroot}%{_libdir}/*.a
%changelog
* Fri Mar 10 2023 Petr Pisar <ppisar@redhat.com> - 1.2.60-3
- Fix a hang in SDL_FreeYUVOverlay() (RH#2173510)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.60-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild