Files
buildroot/package/sdl/0002-SDL_x11yuv.c-fix-possible-use-after-free.patch
Thomas Perale ee647574b7 package/sdl: add CVE trailer in patch
Since Buildroot commit [1] the patches that fixes a security
vulnerability needs to reference the fixed vulnerability.

This patch adds the relevant information to the patch header.

[1] 1167d0ff3d docs/manual: mention CVE trailer

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-12-29 15:06:18 +01:00

31 lines
1.1 KiB
Diff

From c24c08c9aa0f92213793e5ef404f2c387603d7f8 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <sezeroz@gmail.com>
Date: Sat, 18 Jun 2022 14:55:00 +0300
Subject: [PATCH] SDL_x11yuv.c: fix possible use-after-free
CVE: CVE-2022-34568
Fixes: https://github.com/libsdl-org/SDL-1.2/issues/863
Upstream: d7e00208738a0bc6af302723fe64908ac35b777b
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
src/video/x11/SDL_x11yuv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video/x11/SDL_x11yuv.c b/src/video/x11/SDL_x11yuv.c
index 62698dfd..0d5754e3 100644
--- a/src/video/x11/SDL_x11yuv.c
+++ b/src/video/x11/SDL_x11yuv.c
@@ -374,8 +374,8 @@ SDL_Overlay *X11_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, S
#ifdef PITCH_WORKAROUND
if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
/* Ajust overlay width according to pitch */
- XFree(hwdata->image);
width = hwdata->image->pitches[0] / bpp;
+ XFree(hwdata->image);
hwdata->image = SDL_NAME(XvCreateImage)(GFX_Display, xv_port, format,
0, width, height);
}
--
2.50.1