Rebase against a15d4de557ac2ba3b2418cb39fc6080a7523e604

This commit is contained in:
Alistair Leslie-Hughes 2019-01-16 10:05:38 +11:00
parent 50f0724f43
commit 17083b95bb
2 changed files with 8 additions and 8 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "8e0139af2a1cd1ac12aadfa18c8bb04552433ce4"
echo "a15d4de557ac2ba3b2418cb39fc6080a7523e604"
}
# Show version information

View File

@ -1,8 +1,8 @@
From d34044e4deedfccf2bb0d7756fbddfd3197116fd Mon Sep 17 00:00:00 2001
From f11c062d6145e808e9eabdfb987e51e144157ab7 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 20 Oct 2016 19:05:02 +0800
Subject: windowscodecs: Fix the buffer size check in the TIFF decoder's
IWICBitmapFrameDecode::CopyPixels implementation.
Subject: [PATCH] windowscodecs: Fix the buffer size check in the TIFF
decoder's IWICBitmapFrameDecode::CopyPixels implementation.
Otherwise IWICBitmapSource::CopyPixels() after IWICImagingFactory::CreateBitmapFromSource()
fails for an 24bpp RGB/BGR source.
@ -13,18 +13,18 @@ The check is copied from BMP decoder implementation.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c
index 19aa5d5..f4f4a49 100644
index 3d53b2439a3..255c780c9b1 100644
--- a/dlls/windowscodecs/tiffformat.c
+++ b/dlls/windowscodecs/tiffformat.c
@@ -1106,7 +1106,7 @@ static HRESULT WINAPI TiffFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
@@ -1105,7 +1105,7 @@ static HRESULT WINAPI TiffFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
if (cbStride < bytesperrow)
return E_INVALIDARG;
- if ((cbStride * prc->Height) > cbBufferSize)
- if ((cbStride * (prc->Height-1)) + bytesperrow > cbBufferSize)
+ if ((cbStride * (prc->Height-1)) + ((prc->Width * This->decode_info.bpp) + 7)/8 > cbBufferSize)
return E_INVALIDARG;
min_tile_x = prc->X / This->decode_info.tile_width;
--
2.9.0
2.20.1