Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sdl12_compat for openSUSE:Factory 
checked in at 2026-10-05 12:54:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sdl12_compat (Old)
 and      /work/SRC/openSUSE:Factory/.sdl12_compat.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sdl12_compat"

Mon Oct  5 12:54:39 2026 rev:14 rq:1382240 version:1.2.78

Changes:
--------
--- /work/SRC/openSUSE:Factory/sdl12_compat/sdl12_compat.changes        
2026-04-05 18:24:06.837813126 +0200
+++ /work/SRC/openSUSE:Factory/.sdl12_compat.new.3698736/sdl12_compat.changes   
2026-10-05 12:54:52.657863219 +0200
@@ -1,0 +2,8 @@
+Sat Oct  3 12:56:03 UTC 2026 - Jan Engelhardt <[email protected]>
+
+- Update to release 1.2.78
+  * Fixed flickering in SimCity 3000
+  * Fixed stuttering during the intro video in Majesty: The Fantasy
+    Kingdom Sim
+
+-------------------------------------------------------------------

Old:
----
  sdl12-compat-1.2.76.tar.gz
  sdl12-compat-1.2.76.tar.gz.sig

New:
----
  sdl12-compat-1.2.78.tar.gz
  sdl12-compat-1.2.78.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sdl12_compat.spec ++++++
--- /var/tmp/diff_new_pack.rCMpKg/_old  2026-10-05 12:54:53.632905021 +0200
+++ /var/tmp/diff_new_pack.rCMpKg/_new  2026-10-05 12:54:53.634905107 +0200
@@ -19,7 +19,7 @@
 Name:           sdl12_compat
 %define lname libSDL-1_2-0
 %global _lto_cflags %_lto_cflags -ffat-lto-objects
-Version:        1.2.76
+Version:        1.2.78
 Release:        0
 Summary:        SDL-1.2 Compatibility Layer for Simple DirectMedia Layer 2.0
 # Main project is licensed as Zlib

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.rCMpKg/_old  2026-10-05 12:54:53.665906436 +0200
+++ /var/tmp/diff_new_pack.rCMpKg/_new  2026-10-05 12:54:53.667906521 +0200
@@ -1,5 +1,5 @@
-mtime: 1775264559
-commit: 1a2863923a836889d870b3b5092321db11742516cacec64ab3047703aad3a3e8
+mtime: 1791032205
+commit: 9647af1b823d77c48aa7a6474e88c76b707adfbaf09eb21426fedc1da94e2edb
 url: https://src.opensuse.org/jengelh/sdl12_compat
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-10-03 14:56:45.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ sdl12-compat-1.2.76.tar.gz -> sdl12-compat-1.2.78.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/.git-hash 
new/sdl12-compat-1.2.78/.git-hash
--- old/sdl12-compat-1.2.76/.git-hash   2026-04-04 02:40:25.000000000 +0200
+++ new/sdl12-compat-1.2.78/.git-hash   2026-10-03 01:06:44.000000000 +0200
@@ -1 +1 @@
-293b4cbd9eea61b18b9c9425d0c9200bff037360
+07043bdcfd0d16ea8f14fe2a375089d00566a5e9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/AGENTS.md 
new/sdl12-compat-1.2.78/AGENTS.md
--- old/sdl12-compat-1.2.76/AGENTS.md   1970-01-01 01:00:00.000000000 +0100
+++ new/sdl12-compat-1.2.78/AGENTS.md   2026-09-03 18:53:21.000000000 +0200
@@ -0,0 +1,11 @@
+Generative AI, including large language models (LLMs), should not be used in
+any way when contributing to SDL.
+
+We want our code to be art. We want to interact with real humans. Please don't
+submit AI-generated comments or code in bug reports or pull requests. We
+understand some people consider AI to be a useful tool, but we want to connect
+with you, not your computer.
+
+Any pull request to this project will ask you to confirm that you are the
+author and that you are contributing your changes under the zlib license.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/CLAUDE.md 
new/sdl12-compat-1.2.78/CLAUDE.md
--- old/sdl12-compat-1.2.76/CLAUDE.md   1970-01-01 01:00:00.000000000 +0100
+++ new/sdl12-compat-1.2.78/CLAUDE.md   2026-09-03 18:53:21.000000000 +0200
@@ -0,0 +1,11 @@
+Generative AI, including large language models (LLMs), should not be used in
+any way when contributing to SDL.
+
+We want our code to be art. We want to interact with real humans. Please don't
+submit AI-generated comments or code in bug reports or pull requests. We
+understand some people consider AI to be a useful tool, but we want to connect
+with you, not your computer.
+
+Any pull request to this project will ask you to confirm that you are the
+author and that you are contributing your changes under the zlib license.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/CMakeLists.txt 
new/sdl12-compat-1.2.78/CMakeLists.txt
--- old/sdl12-compat-1.2.76/CMakeLists.txt      2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/CMakeLists.txt      2026-10-03 01:06:44.000000000 
+0200
@@ -3,7 +3,7 @@
 #        cmake -DSDL2_INCLUDE_DIR=/opt/SDL2/include/SDL2 [other stuff]
 
 cmake_minimum_required(VERSION 3.0.0...4.1)
-project(sdl12_compat VERSION 1.2.76 LANGUAGES C)
+project(sdl12_compat VERSION 1.2.78 LANGUAGES C)
 
 option(SDL12TESTS "Enable to build SDL-1.2 test programs" ON)
 option(SDL12DEVEL "Enable installing SDL-1.2 development headers" ON)
@@ -33,7 +33,7 @@
   # Xcode project file uses 1.0.0, but it's more compatible to use the
   # higher version.
   set(DYLIB_COMPAT_VERSION 12.0.0 CACHE STRING "library compatibility version")
-  set(DYLIB_CURRENT_VERSION 12.76.0 CACHE STRING "library current version")
+  set(DYLIB_CURRENT_VERSION 12.78.0 CACHE STRING "library current version")
   include_directories("/opt/X11/include")  # hack.
   if(CMAKE_VERSION VERSION_LESS 3.9)
   else()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/REVISION.txt 
new/sdl12-compat-1.2.78/REVISION.txt
--- old/sdl12-compat-1.2.76/REVISION.txt        2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/REVISION.txt        2026-10-03 01:06:44.000000000 
+0200
@@ -1 +1 @@
-release-1.2.76-0-g293b4cb
+release-1.2.78-0-g07043bd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/include/SDL/SDL_config.h 
new/sdl12-compat-1.2.78/include/SDL/SDL_config.h
--- old/sdl12-compat-1.2.76/include/SDL/SDL_config.h    2026-01-01 
19:02:30.000000000 +0100
+++ new/sdl12-compat-1.2.78/include/SDL/SDL_config.h    2026-05-25 
17:40:20.000000000 +0200
@@ -147,7 +147,6 @@
 #define HAVE_RINDEX 1
 #define HAVE_ITOA 1
 #define HAVE__LTOA 1
-#define HAVE__UITOA 1
 #define HAVE__ULTOA 1
 #define HAVE__I64TOA 1
 #define HAVE__UI64TOA 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/include/SDL/SDL_version.h 
new/sdl12-compat-1.2.78/include/SDL/SDL_version.h
--- old/sdl12-compat-1.2.76/include/SDL/SDL_version.h   2026-04-04 
02:40:25.000000000 +0200
+++ new/sdl12-compat-1.2.78/include/SDL/SDL_version.h   2026-10-03 
01:06:44.000000000 +0200
@@ -33,7 +33,7 @@
 /* We bumped the patchlevel to 50 for sdl12-compat */
 #define SDL_MAJOR_VERSION 1
 #define SDL_MINOR_VERSION 2
-#define SDL_PATCHLEVEL 76
+#define SDL_PATCHLEVEL 78
 
 typedef struct SDL_version
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/Makefile.darwin 
new/sdl12-compat-1.2.78/src/Makefile.darwin
--- old/sdl12-compat-1.2.76/src/Makefile.darwin 2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/Makefile.darwin 2026-10-03 01:06:44.000000000 
+0200
@@ -18,7 +18,7 @@
 LDFLAGS = -mmacosx-version-min=10.6 -dynamiclib -Wl,-undefined,error 
-Wl,-single_module
 #LDFLAGS+= -Wl,-headerpad_max_install_names
 LDFLAGS+= -Wl,-install_name,"/usr/local/lib/$(DYLIB)"
-LDFLAGS+= -Wl,-compatibility_version,1.0 -Wl,-current_version,12.76
+LDFLAGS+= -Wl,-compatibility_version,1.0 -Wl,-current_version,12.78
 LDLIBS  = -Wl,-framework,AppKit
 # this is needed for x86_64 - cross-gcc might not add it.
 #LDLIBS += -Wl,-lbundle1.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/Makefile.linux 
new/sdl12-compat-1.2.78/src/Makefile.linux
--- old/sdl12-compat-1.2.76/src/Makefile.linux  2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/Makefile.linux  2026-10-03 01:06:44.000000000 
+0200
@@ -16,7 +16,7 @@
 LDFLAGS+= -Wl,--no-undefined
 LDLIBS  = -ldl
 
-SHLIB = libSDL-1.2.so.1.2.76
+SHLIB = libSDL-1.2.so.1.2.78
 
 OBJ = SDL12_compat.o
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/Makefile.os2 
new/sdl12-compat-1.2.78/src/Makefile.os2
--- old/sdl12-compat-1.2.76/src/Makefile.os2    2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/Makefile.os2    2026-10-03 01:06:44.000000000 
+0200
@@ -5,7 +5,7 @@
 !endif
 
 DLLNAME = SDL12
-VERSION = 1.2.76
+VERSION = 1.2.78
 
 # change SDL2INC to point to the SDL2 headers
 SDL2INC = include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/Makefile.w32 
new/sdl12-compat-1.2.78/src/Makefile.w32
--- old/sdl12-compat-1.2.76/src/Makefile.w32    2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/Makefile.w32    2026-10-03 01:06:44.000000000 
+0200
@@ -5,7 +5,7 @@
 !endif
 
 DLLNAME = SDL
-VERSION = 1.2.76
+VERSION = 1.2.78
 
 # change SDL2INC to point to the SDL2 headers
 SDL2INC = include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/SDL12_compat.c 
new/sdl12-compat-1.2.78/src/SDL12_compat.c
--- old/sdl12-compat-1.2.76/src/SDL12_compat.c  2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/SDL12_compat.c  2026-10-03 01:06:44.000000000 
+0200
@@ -28,7 +28,7 @@
  * should be way ahead of what SDL-1.2 Classic would report, so apps can
  * decide if they're running under the compat layer, if they really care.
  */
-#define SDL12_COMPAT_VERSION 76
+#define SDL12_COMPAT_VERSION 78
 
 #include <stdarg.h>
 #include <limits.h>
@@ -1158,11 +1158,11 @@
 /* you can use SDL20_strlen once we're past startup. */
 static int SDL12COMPAT_strlen(const char *str)
 {
-    volatile int retval = 0;  /* volatile prevents gcc from optimizing this 
into strlen() */
-    while (str[retval]) {
-        retval++;
+    volatile const char *ptr = str;
+    while (*ptr) {
+        ++ptr;
     }
-    return retval;
+    return (int)(ptr - str);
 }
 
 /* you can use SDL20_strcmp once we're past startup. */
@@ -1304,7 +1304,7 @@
             "@executable_path/" SDL20_LIBNAME2, /* 
MyApp.app/Contents/MacOS/libSDL2-2.0.dylib */
             "@executable_path/../Frameworks/" SDL20_FRAMEWORK, /* 
MyApp.app/Contents/Frameworks/SDL2.framework */
             NULL,  /* /Users/username/Library/Frameworks/SDL2.framework */
-            "/Library/Frameworks" SDL20_FRAMEWORK, /* 
/Library/Frameworks/SDL2.framework */
+            "/Library/Frameworks/" SDL20_FRAMEWORK, /* 
/Library/Frameworks/SDL2.framework */
             SDL20_LIBNAME, /* oh well, anywhere the system can see the .dylib 
(/usr/local/lib or whatever) */
             SDL20_LIBNAME2
         };
@@ -1477,6 +1477,18 @@
 
     /* Sacred Gold manually frees SDL surface pixels */
     {"sacred", "SDL_SURFACE_MALLOC", "1"},
+    {"sacred", "SDL_VIDEODRIVER", "x11"},
+
+    /* Creatures Internet Edition calls SDL_GetWMInfo() and exit if it fails */
+    {"lc2e", "SDL_VIDEODRIVER", "x11"},
+
+    /* Majesty: The Fantasy Kingdom Sim */
+    {"majesty", "SDL_VIDEODRIVER", "x11"},
+    {"majx", "SDL_VIDEODRIVER", "x11"},
+
+#elif defined(_WIN32)
+    // Penumbra: Overture doesn't like GL scaling.
+    {"Penumbra.exe", "SDL12COMPAT_OPENGL_SCALING", "0"},
 
 #else
     /* TODO: Add any quirks needed for this system. */
@@ -7039,14 +7051,15 @@
     SDL_Rect srcrect20, dstrect20;
     int retval;
 
-    PrepBlitDestRect(&dstrect20, dst12, dstrect12);
-
     if ((src12 == NULL) || (dst12 == NULL)) {
         return SDL20_SetError("SDL_UpperBlit: passed a NULL surface");
     }
     if ((src12->pixels == NULL) || (dst12->pixels == NULL)) {
         return SDL20_SetError("SDL_UpperBlit: passed a surface with NULL 
pixels");
     }
+
+    PrepBlitDestRect(&dstrect20, dst12, dstrect12);
+
     if (SaveDestAlpha(src12, dst12, &dstrect20, &dstalpha) < 0) {
         return -1;
     }
@@ -7260,6 +7273,12 @@
         return;
     }
 
+    /* We're going to present this frame.
+     *
+     * Clear this before SDL_PumpEvents(), otherwise PumpEvents can 
recursively call PresentScreen().
+     */
+    VideoSurfacePresentTicks = 0;
+
     /* We don't actually implement an event thread in sdl12-compat, but some
      * games will only call SDL_PeepEvents(), which doesn't otherwise pump
      * events, and get stuck when they've consumed all the events.
@@ -7294,7 +7313,6 @@
     SDL20_RenderPresent(renderer);
     VideoSurfaceUpdatedInBackgroundThread = SDL_FALSE;
     VideoSurfaceLastPresentTicks = SDL20_GetTicks();
-    VideoSurfacePresentTicks = 0;
 
     UnlockVideoRenderer();
 }
@@ -8203,7 +8221,7 @@
     for (overlay = QueuedDisplayOverlays.next; overlay != NULL; overlay = 
overlay->next) {
         if (overlay->overlay12 == overlay12) {   /* trying to draw the same 
overlay twice in one frame? Dump the current surface and overlays to the screen 
now. */
             /* Force an update of the screen. */
-            if (ThisIsSetVideoModeThread) {
+            if (ThisIsSetVideoModeThread || AllowThreadedDraws) {
                 if (VideoSurfaceUpdatedInBackgroundThread) {
                     SDL_Flip(VideoSurface12);  /* this will update the texture 
and present. */
                 } else if (VideoSurfacePresentTicks) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/dr_mp3.h 
new/sdl12-compat-1.2.78/src/dr_mp3.h
--- old/sdl12-compat-1.2.76/src/dr_mp3.h        2026-01-17 03:10:00.000000000 
+0100
+++ new/sdl12-compat-1.2.78/src/dr_mp3.h        2026-09-15 20:45:40.000000000 
+0200
@@ -1,6 +1,6 @@
 /*
 MP3 audio decoder. Choice of public domain or MIT-0. See license statements at 
the end of this file.
-dr_mp3 - v0.7.3 - 2026-01-17
+dr_mp3 - v0.7.4 - TBD
 
 David Reid - [email protected]
 
@@ -78,7 +78,7 @@
 
 #define DRMP3_VERSION_MAJOR     0
 #define DRMP3_VERSION_MINOR     7
-#define DRMP3_VERSION_REVISION  3
+#define DRMP3_VERSION_REVISION  4
 #define DRMP3_VERSION_STRING    DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." 
DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." 
DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
 
 #include <stddef.h> /* For size_t. */
@@ -674,8 +674,10 @@
 
 #if !defined(DR_MP3_NO_SIMD)
 
-#if !defined(DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || 
defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC))
-/* x64 always have SSE2, arm64 always have neon, no need for generic code */
+#if !defined(DR_MP3_ONLY_SIMD) && ((defined(_MSC_VER) && _MSC_VER >= 1400) && 
defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) 
|| defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || 
defined(__SSE2__)))
+#define DR_MP3_ONLY_SIMD
+#endif
+#if !defined(DR_MP3_ONLY_SIMD) && (defined(__ARM_NEON) || defined(__aarch64__) 
|| defined(_M_ARM64) || defined(_M_ARM64EC))
 #define DR_MP3_ONLY_SIMD
 #endif
 
@@ -3200,10 +3202,28 @@
                 drmp3_bool32 isInfo = DRMP3_FALSE;
                 const drmp3_uint8* pTagData;
                 const drmp3_uint8* pTagDataBeg;
+                const void* pDataBufferEnd = NULL;
+                size_t frameBytes;
 
                 pTagDataBeg = pFirstFrameData + DRMP3_HDR_SIZE + (bs.pos/8);
                 pTagData    = pTagDataBeg;
 
+                /*
+                We need to determine how many bytes are actually available in 
pTagData. Unfortunately this is different depending on
+                whether or not it's being decoded from memory or callbacks.
+                */
+                if (pMP3->memory.pData != NULL && pMP3->memory.dataSize > 0) {
+                    pDataBufferEnd = pMP3->memory.pData + 
pMP3->memory.dataSize;
+                } else {
+                    pDataBufferEnd = pMP3->pData + pMP3->dataCapacity;
+                }
+
+                frameBytes = DRMP3_MIN((size_t)firstFrameInfo.frame_bytes, 
(size_t)((drmp3_uint8*)pDataBufferEnd - pFirstFrameData));
+
+                if (frameBytes < (size_t)(pTagData - pFirstFrameData) + 8) {
+                    goto done_xing_info;    /* Frame too small for a Xing/Info 
tag. */
+                }
+
                 /* Check for both "Xing" and "Info" identifiers. */
                 isXing = (pTagData[0] == 'X' && pTagData[1] == 'i' && 
pTagData[2] == 'n' && pTagData[3] == 'g');
                 isInfo = (pTagData[0] == 'I' && pTagData[1] == 'n' && 
pTagData[2] == 'f' && pTagData[3] == 'o');
@@ -3215,42 +3235,64 @@
                     pTagData += 8;  /* Skip past the ID and flags. */
 
                     if (flags & 0x01) { /* FRAMES flag. */
+                        if (frameBytes < (size_t)(pTagData - pFirstFrameData) 
+ 4) {
+                            goto done_xing_info;    /* Invalid Xing/Info tag. 
*/
+                        }
+
                         detectedMP3FrameCount = (drmp3_uint32)pTagData[0] << 
24 | (drmp3_uint32)pTagData[1] << 16 | (drmp3_uint32)pTagData[2] << 8 | 
(drmp3_uint32)pTagData[3];
                         pTagData += 4;
                     }
 
                     if (flags & 0x02) { /* BYTES flag. */
+                        if (frameBytes < (size_t)(pTagData - pFirstFrameData) 
+ 4) {
+                            goto done_xing_info;    /* Invalid Xing/Info tag. 
*/
+                        }
+
                         bytes  = (drmp3_uint32)pTagData[0] << 24 | 
(drmp3_uint32)pTagData[1] << 16 | (drmp3_uint32)pTagData[2] << 8 | 
(drmp3_uint32)pTagData[3];
                         (void)bytes;    /* <-- Just to silence a warning about 
`bytes` being assigned but unused. Want to leave this here in case I want to 
make use of it later. */
                         pTagData += 4;
                     }
 
                     if (flags & 0x04) { /* TOC flag. */
+                        if (frameBytes < (size_t)(pTagData - pFirstFrameData) 
+ 100) {
+                            goto done_xing_info;    /* Invalid Xing/Info tag. 
*/
+                        }
+
                         /* TODO: Extract and bind seek points. */
                         pTagData += 100;
                     }
 
                     if (flags & 0x08) { /* SCALE flag. */
+                        if (frameBytes < (size_t)(pTagData - pFirstFrameData) 
+ 4) {
+                            goto done_xing_info;    /* Invalid Xing/Info tag. 
*/
+                        }
+
                         pTagData += 4;
                     }
 
                     /* At this point we're done with the Xing/Info header. Now 
we can look at the LAME data. */
+                    if (frameBytes < (size_t)(pTagData - pFirstFrameData) + 1) 
{
+                        goto done_xing_info;    /* Not enough data left to 
check for a LAME header. */
+                    }
+
                     if (pTagData[0]) {
+                        int delayInPCMFrames;
+                        int paddingInPCMFrames;
+
+                        if (frameBytes < (size_t)(pTagData - pFirstFrameData) 
+ 36) {
+                            goto done_xing_info;    /* Invalid Xing/Info tag. 
*/
+                        }
+
                         pTagData += 21;
 
-                        if (pTagData - pFirstFrameData + 14 < 
firstFrameInfo.frame_bytes) {
-                            int delayInPCMFrames;
-                            int paddingInPCMFrames;
-
-                            delayInPCMFrames   = (( (drmp3_uint32)pTagData[0]  
      << 4) | ((drmp3_uint32)pTagData[1] >> 4)) + (528 + 1);
-                            paddingInPCMFrames = ((((drmp3_uint32)pTagData[1] 
& 0xF) << 8) | ((drmp3_uint32)pTagData[2]     )) - (528 + 1);
-                            if (paddingInPCMFrames < 0) {
-                                paddingInPCMFrames = 0; /* Padding cannot be 
negative. Probably a malformed file. Ignore. */
-                            }
-                            
-                            pMP3->delayInPCMFrames   = 
(drmp3_uint32)delayInPCMFrames;
-                            pMP3->paddingInPCMFrames = 
(drmp3_uint32)paddingInPCMFrames;
+                        delayInPCMFrames   = (( (drmp3_uint32)pTagData[0]      
  << 4) | ((drmp3_uint32)pTagData[1] >> 4)) + (528 + 1);
+                        paddingInPCMFrames = ((((drmp3_uint32)pTagData[1] & 
0xF) << 8) | ((drmp3_uint32)pTagData[2]     )) - (528 + 1);
+                        if (paddingInPCMFrames < 0) {
+                            paddingInPCMFrames = 0; /* Padding cannot be 
negative. Probably a malformed file. Ignore. */
                         }
+                        
+                        pMP3->delayInPCMFrames   = 
(drmp3_uint32)delayInPCMFrames;
+                        pMP3->paddingInPCMFrames = 
(drmp3_uint32)paddingInPCMFrames;
                     }
 
                     /*
@@ -3289,6 +3331,8 @@
                     */
                     drmp3dec_init(&pMP3->decoder);
                 }
+
+                done_xing_info:;
             } else {
                 /* Failed to read the side info. */
             }
@@ -3301,7 +3345,7 @@
     }
 
     if (detectedMP3FrameCount != 0xFFFFFFFF) {
-        pMP3->totalPCMFrameCount = detectedMP3FrameCount * 
firstFramePCMFrameCount;
+        pMP3->totalPCMFrameCount = (drmp3_uint64)detectedMP3FrameCount * 
firstFramePCMFrameCount;
     }
 
     pMP3->channels   = pMP3->mp3FrameChannels;
@@ -4264,7 +4308,7 @@
 #else
     /* Slow path. Convert from s16 to f32. */
     {
-        drmp3_int16 pTempS16[8192];
+        drmp3_int16 pTempS16[1152*2];   /* MP3 frames have a maximum 
per-channel sample count of 1152. Times 2 to account for stereo. */
         drmp3_uint64 totalPCMFramesRead = 0;
 
         while (totalPCMFramesRead < framesToRead) {
@@ -4302,7 +4346,7 @@
 #else
     /* Slow path. Convert from f32 to s16. */
     {
-        float pTempF32[4096];
+        float pTempF32[1152*2];   /* MP3 frames have a maximum per-channel 
sample count of 1152. Times 2 to account for stereo. */
         drmp3_uint64 totalPCMFramesRead = 0;
 
         while (totalPCMFramesRead < framesToRead) {
@@ -4791,7 +4835,7 @@
     drmp3_uint64 totalFramesRead = 0;
     drmp3_uint64 framesCapacity = 0;
     float* pFrames = NULL;
-    float temp[4096];
+    float temp[1152*2];   /* MP3 frames have a maximum per-channel sample 
count of 1152. Times 2 to account for stereo. */
 
     DRMP3_ASSERT(pMP3 != NULL);
 
@@ -4861,7 +4905,7 @@
     drmp3_uint64 totalFramesRead = 0;
     drmp3_uint64 framesCapacity = 0;
     drmp3_int16* pFrames = NULL;
-    drmp3_int16 temp[4096];
+    drmp3_int16 temp[1152*2];   /* MP3 frames have a maximum per-channel 
sample count of 1152. Times 2 to account for stereo. */
 
     DRMP3_ASSERT(pMP3 != NULL);
 
@@ -5034,6 +5078,12 @@
 /*
 REVISION HISTORY
 ================
+v0.7.4 - TBD
+  - Fix an overflow error with "Xing" and "Info" tag parsing.
+  - Add some validation checks for "Xing" and "Info" tag parsing.
+  - Reduce size of some stack allocations.
+  - Improvements to SIMD detection.
+
 v0.7.3 - 2026-01-17
   - Fix an error in drmp3_open_and_read_pcm_frames_s16() and family when 
memory allocation fails.
   - Fix some compilation warnings.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdl12-compat-1.2.76/src/version.rc 
new/sdl12-compat-1.2.78/src/version.rc
--- old/sdl12-compat-1.2.76/src/version.rc      2026-04-04 02:40:25.000000000 
+0200
+++ new/sdl12-compat-1.2.78/src/version.rc      2026-10-03 01:06:44.000000000 
+0200
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,2,76,0
- PRODUCTVERSION 1,2,76,0
+ FILEVERSION 1,2,78,0
+ PRODUCTVERSION 1,2,78,0
  FILEFLAGSMASK 0x3fL
  FILEFLAGS 0x0L
  FILEOS 0x40004L
@@ -17,12 +17,12 @@
         BEGIN
             VALUE "CompanyName", "\0"
             VALUE "FileDescription", "SDL\0"
-            VALUE "FileVersion", "1, 2, 76, 0\0"
+            VALUE "FileVersion", "1, 2, 78, 0\0"
             VALUE "InternalName", "SDL\0"
             VALUE "LegalCopyright", "Copyright (C) 2026 Sam Lantinga\0"
             VALUE "OriginalFilename", "SDL.dll\0"
             VALUE "ProductName", "Simple DirectMedia Layer 1.2 wrapper\0"
-            VALUE "ProductVersion", "1, 2, 76, 0\0"
+            VALUE "ProductVersion", "1, 2, 78, 0\0"
         END
     END
     BLOCK "VarFileInfo"

Reply via email to