From 4bc78e7bb4c9e0923ca33103718ec60bfa2367f2 Mon Sep 17 00:00:00 2001 From: Prokhorov Kirill Date: Tue, 28 Oct 2025 11:16:53 +0300 Subject: [PATCH] Fix bug 74748 --- DesktopEditor/cximage/CxImage/tif_xfile.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DesktopEditor/cximage/CxImage/tif_xfile.cpp b/DesktopEditor/cximage/CxImage/tif_xfile.cpp index ca622db311..be0c2c3d0a 100644 --- a/DesktopEditor/cximage/CxImage/tif_xfile.cpp +++ b/DesktopEditor/cximage/CxImage/tif_xfile.cpp @@ -16,7 +16,15 @@ static tsize_t _tiffReadProcEx(thandle_t fd, tdata_t buf, tsize_t size) { - return (tsize_t)((CxFile*)fd)->Read(buf, 1, size); + tsize_t nReadCount = (tsize_t)((CxFile*)fd)->Read(buf, 1, size); + + if (nReadCount < size) + { + memset(static_cast(buf) + nReadCount, 0, size - nReadCount); + return size; + } + + return nReadCount; } static tsize_t