Module: wine Branch: master Commit: 9724c6d774f1834f3ccf61047577757277ca639c URL: http://source.winehq.org/git/wine.git/?a=commit;h=9724c6d774f1834f3ccf610475...
Author: Andrey Turkin andrey.turkin@gmail.com Date: Sat May 22 00:48:19 2010 +0400
oleaut32: Fix ctl2_alloc_importfile offset calculations.
---
dlls/oleaut32/typelib2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index b5ebea3..70454dc 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -779,8 +779,8 @@ static int ctl2_alloc_importfile( encoded_string[0] |= 1;
for (offset = 0; offset < This->typelib_segdir[MSFT_SEG_IMPORTFILES].length; - offset += ((((This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xd] << 8) & 0xff) - | (This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc] & 0xff)) >> 2) + 0xc) { + offset += ((((((This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xd] << 8) & 0xff00) + | (This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc] & 0xff)) >> 2) + 5) & 0xfffc) + 0xc) { if (!memcmp(encoded_string, This->typelib_segment_data[MSFT_SEG_IMPORTFILES] + offset + 0xc, length)) return offset; }