From 17083b95bbe6dc15d7bf2311b6d420a84f3f0cab Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 16 Jan 2019 10:05:38 +1100 Subject: [PATCH] Rebase against a15d4de557ac2ba3b2418cb39fc6080a7523e604 --- patches/patchinstall.sh | 2 +- ...cs-Fix-the-buffer-size-check-in-the-TIFF-.patch | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b491c993..ed5d12ef 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8e0139af2a1cd1ac12aadfa18c8bb04552433ce4" + echo "a15d4de557ac2ba3b2418cb39fc6080a7523e604" } # Show version information diff --git a/patches/windowscodecs-GIF_Encoder/0014-windowscodecs-Fix-the-buffer-size-check-in-the-TIFF-.patch b/patches/windowscodecs-GIF_Encoder/0014-windowscodecs-Fix-the-buffer-size-check-in-the-TIFF-.patch index dccf54ca..b0570980 100644 --- a/patches/windowscodecs-GIF_Encoder/0014-windowscodecs-Fix-the-buffer-size-check-in-the-TIFF-.patch +++ b/patches/windowscodecs-GIF_Encoder/0014-windowscodecs-Fix-the-buffer-size-check-in-the-TIFF-.patch @@ -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 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