You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added patch to fix init of LONGLONG variable with a negative value in TGA decoder.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From be030703b8d36d47a7cfcad5268c983fa8fdf3ea Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
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
|
||||
|
1
patches/windowscodecs-TGA_Decoder/definition
Normal file
1
patches/windowscodecs-TGA_Decoder/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: Fix init of LONGLONG variable with a negative value in TGA decoder
|
Reference in New Issue
Block a user