diff --git a/README.md b/README.md index 52f7c6a8..31b71d30 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,11 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [3]:** +**Bugfixes and features included in the next upcoming release [4]:** * Child of Light expects FindConnectionPoint to succeed and increase the refcount ([Wine Bug #36408](https://bugs.winehq.org/show_bug.cgi?id=36408)) * Do not append duplicate NULL characters when importing keys with regedit ([Wine Bug #37575](https://bugs.winehq.org/show_bug.cgi?id=37575)) +* Fix init of LONGLONG variable with a negative value in TGA decoder * Support for DDS file format in D3DXSaveTextureToFileInMemory ([Wine Bug #26898](https://bugs.winehq.org/show_bug.cgi?id=26898)) diff --git a/debian/changelog b/debian/changelog index 3b66908f..28692f3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ wine-staging (1.7.35) UNRELEASED; urgency=low * Added patch to implement support for DDS file format in D3DXSaveTextureToFileInMemory. * Added patch to avoid appending duplicate NULL character when importing keys with regedit. * Added patch for IConnectionPoint/INetworkListManagerEvents stub interface. + * Added patch to fix init of LONGLONG variable with a negative value in TGA decoder. * Removed patch to set last error on success in WSARecv (accepted upstream). * Removed patch to fix handling of subdirectory in FtpFindFirstFile (accepted upstream). -- Sebastian Lackner Mon, 12 Jan 2015 13:06:22 +0100 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 22c67e4b..5524d2df 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -165,6 +165,7 @@ patch_enable_all () enable_user32_Mouse_Message_Hwnd="$1" enable_user32_ScrollWindowEx="$1" enable_user32_WndProc="$1" + enable_windowscodecs_TGA_Decoder="$1" enable_wineboot_HKEY_DYN_DATA="$1" enable_winebuild_LinkerVersion="$1" enable_winecfg_Staging="$1" @@ -522,6 +523,9 @@ patch_enable () user32-WndProc) enable_user32_WndProc="$2" ;; + windowscodecs-TGA_Decoder) + enable_windowscodecs_TGA_Decoder="$2" + ;; wineboot-HKEY_DYN_DATA) enable_wineboot_HKEY_DYN_DATA="$2" ;; @@ -2807,6 +2811,18 @@ if test "$enable_user32_WndProc" -eq 1; then ) >> "$patchlist" fi +# Patchset windowscodecs-TGA_Decoder +# | +# | Modified files: +# | * dlls/windowscodecs/tgaformat.c +# | +if test "$enable_windowscodecs_TGA_Decoder" -eq 1; then + patch_apply windowscodecs-TGA_Decoder/0001-windowscodecs-Fix-init-of-LONGLONG-variable-with-a-n.patch + ( + echo '+ { "Christian Costa", "windowscodecs: Fix init of LONGLONG variable with a negative value in TGA decoder.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wineboot-HKEY_DYN_DATA # | # | This patchset fixes the following Wine bugs: diff --git a/patches/windowscodecs-TGA_Decoder/0001-windowscodecs-Fix-init-of-LONGLONG-variable-with-a-n.patch b/patches/windowscodecs-TGA_Decoder/0001-windowscodecs-Fix-init-of-LONGLONG-variable-with-a-n.patch new file mode 100644 index 00000000..0078ef92 --- /dev/null +++ b/patches/windowscodecs-TGA_Decoder/0001-windowscodecs-Fix-init-of-LONGLONG-variable-with-a-n.patch @@ -0,0 +1,28 @@ +From be030703b8d36d47a7cfcad5268c983fa8fdf3ea Mon Sep 17 00:00:00 2001 +From: Christian Costa +Date: Thu, 15 Jan 2015 09:57:18 +0100 +Subject: windowscodecs: Fix init of LONGLONG variable with a negative value in + TGA decoder. + +sizeof() is unsigned and thus -sizeof() too which leads to the signed bit not propagated when converted to LONGLONG. +This bug prevented the footage header to be found which contains the TGA spec 2.0 extension. +--- + dlls/windowscodecs/tgaformat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c +index f2a867a..2b8cb1a 100644 +--- a/dlls/windowscodecs/tgaformat.c ++++ b/dlls/windowscodecs/tgaformat.c +@@ -292,7 +292,7 @@ static HRESULT WINAPI TgaDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p + This->image_offset = This->colormap_offset + This->colormap_length; + + /* Read footer if there is one */ +- seek.QuadPart = -sizeof(tga_footer); ++ seek.QuadPart = -(LONGLONG)sizeof(tga_footer); + hr = IStream_Seek(pIStream, seek, STREAM_SEEK_END, NULL); + + if (SUCCEEDED(hr)) { +-- +2.2.1 + diff --git a/patches/windowscodecs-TGA_Decoder/definition b/patches/windowscodecs-TGA_Decoder/definition new file mode 100644 index 00000000..f828dfff --- /dev/null +++ b/patches/windowscodecs-TGA_Decoder/definition @@ -0,0 +1 @@ +Fixes: Fix init of LONGLONG variable with a negative value in TGA decoder