cabinet: Fix the regression caused by 4046075462c00f4479f185d1c0514584ff851223
Dmitry Timoshkov
dmitry at codeweavers.com
Thu May 15 05:53:36 CDT 2008
Hello,
this patch fixes the regression leading to a corrupted Adobe Photoshop
installations. The regression is caused by
4046075462c00f4479f185d1c0514584ff851223 is first bad commit
commit 4046075462c00f4479f185d1c0514584ff851223
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Tue May 13 22:41:58 2008 +0100
cabinet: Remove order-of-evaluation dependencies.
in particular by this change:
- n -= (e = (e = ZIPWSIZE - ((d &= ZIPWSIZE-1) > w ? d : w)) > n ?n:e);
+ d = max(d & (ZIPWSIZE - 1), w);
+ e = min(ZIPWSIZE - d, n);
+ n -= e;
Changelog:
cabinet: Fix the regression caused by 4046075462c00f4479f185d1c0514584ff851223.
---
dlls/cabinet/fdi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
index 3194d67..47e36e8 100644
--- a/dlls/cabinet/fdi.c
+++ b/dlls/cabinet/fdi.c
@@ -1178,8 +1178,9 @@ static cab_LONG fdi_Zipinflate_codes(const struct Ziphuft *tl, const struct Ziph
ZIPDUMPBITS(e)
do
{
- d = max(d & (ZIPWSIZE - 1), w);
- e = min(ZIPWSIZE - d, n);
+ d &= ZIPWSIZE - 1;
+ e = ZIPWSIZE - max(d, w);
+ e = min(e, n);
n -= e;
do
{
--
1.5.5.1
More information about the wine-patches
mailing list