winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
879 discussions
Start a n
N
ew thread
Ken Thomases : winemenubuilder: On Mac, ignore non-square icon entries.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: eb4093909273b48abfecda5df4f59d9c2d310ed0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb4093909273b48abfecda5df…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Jan 12 00:17:25 2011 -0600 winemenubuilder: On Mac, ignore non-square icon entries. --- programs/winemenubuilder/winemenubuilder.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 684e130..8cafce0 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -867,6 +867,8 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico int height = iconDirEntries[i].bHeight ? iconDirEntries[i].bHeight : 256; WINE_TRACE("[%d]: %d x %d @ %d\n", i, width, height, iconDirEntries[i].wBitCount); + if (height != width) + continue; slot = size_to_slot(width); if (slot < 0) continue;
1
0
0
0
Ken Thomases : winemenubuilder: On Mac, understand and keep 256x256 Vista-style icons.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 3a5e6c43577f0efa6d1f740d36ab0322d40a1d5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a5e6c43577f0efa6d1f740d3…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Jan 12 00:17:20 2011 -0600 winemenubuilder: On Mac, understand and keep 256x256 Vista-style icons. --- programs/winemenubuilder/winemenubuilder.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 8996836..684e130 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -863,17 +863,18 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico for (i = 0; i < numEntries; i++) { int slot; + int width = iconDirEntries[i].bWidth ? iconDirEntries[i].bWidth : 256; + int height = iconDirEntries[i].bHeight ? iconDirEntries[i].bHeight : 256; - WINE_TRACE("[%d]: %d x %d @ %d\n", i, iconDirEntries[i].bWidth, - iconDirEntries[i].bHeight, iconDirEntries[i].wBitCount); - slot = size_to_slot(iconDirEntries[i].bWidth); + WINE_TRACE("[%d]: %d x %d @ %d\n", i, width, height, iconDirEntries[i].wBitCount); + slot = size_to_slot(width); if (slot < 0) continue; if (iconDirEntries[i].wBitCount >= best[slot].maxBits && - (iconDirEntries[i].bHeight * iconDirEntries[i].bWidth) >= best[slot].maxPixels) + (height * width) >= best[slot].maxPixels) { best[slot].index = i; - best[slot].maxPixels = iconDirEntries[i].bHeight * iconDirEntries[i].bWidth; + best[slot].maxPixels = height * width; best[slot].maxBits = iconDirEntries[i].wBitCount; } }
1
0
0
0
Juan Lang : rsaenh/tests: Add tests for CRYPT_IPSEC_HMAC_KEY.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 597a2f501a790487e4b2b438866cefeda795a4e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=597a2f501a790487e4b2b4388…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Jan 11 15:50:27 2011 -0800 rsaenh/tests: Add tests for CRYPT_IPSEC_HMAC_KEY. --- dlls/rsaenh/tests/rsaenh.c | 111 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 111 insertions(+), 0 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 7892f1a..844747c 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -2151,6 +2151,116 @@ static void test_import_export(void) CryptDestroyKey(hPrivKey); } + +static void test_import_hmac(void) +{ + /* Test cases from RFC 2202, section 3 */ + static const struct rfc2202_test_case { + const char *key; + DWORD key_len; + const char *data; + const DWORD data_len; + const char *digest; + } cases[] = { + { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" + "\x0b\x0b\x0b\x0b", 20, + "Hi There", 8, + "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e" + "\xf1\x46\xbe\x00" }, + { "Jefe", 4, + "what do ya want for nothing?", 28, + "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf\x9c" + "\x25\x9a\x7c\x79" }, + { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa", 20, + "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" + "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" + "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd" + "\xdd\xdd", 50, + "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b\x4f" + "\x63\xf1\x75\xd3" }, + { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" + "\x11\x12\x13\x14\x15\x16\x17\x18\x19", 25, + "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" + "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" + "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd" + "\xcd\xcd", 50, + "\x4c\x90\x07\xF4\x02\x62\x50\xc6\xbc\x84\x14\xf9\xbf\x50\xc8\x6c" + "\x2d\x72\x35\xda" }, + { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c" + "\x0c\x0c\x0c\x0c", 20, + "Test With Truncation", 20, + "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2\x7b\xe1\xd5\x8b\xb9\x32" + "\x4a\x9a\x5a\x04" }, + { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", + 80, + "Test Using Larger Than Block-Size Key - Hash Key First", 54, + "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70\x56\x37\xce\x8a\x3b\x55" + "\xed\x40\x21\x12" }, + { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", + 80, + "Test Using Larger Than Block-Size Key and Larger " + "Than One Block-Size Data", 73, + "\xe8\xe9\x9D\x0f\x45\x23\x7d\x78\x6d\x6b\xba\xa7\x96\x5c\x78\x08" + "\xbb\xff\x1a\x91" } + }; + DWORD i; + + for (i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) + { + const struct rfc2202_test_case *test_case = &cases[i]; + DWORD size = sizeof(BLOBHEADER) + sizeof(DWORD) + test_case->key_len; + BYTE *blob = HeapAlloc(GetProcessHeap(), 0, size); + + if (blob) + { + BLOBHEADER *header = (BLOBHEADER *)blob; + DWORD *key_len = (DWORD *)(header + 1); + BYTE *key_bytes = (BYTE *)(key_len + 1); + BOOL result; + HCRYPTKEY key; + + header->bType = PLAINTEXTKEYBLOB; + header->bVersion = CUR_BLOB_VERSION; + header->reserved = 0; + header->aiKeyAlg = CALG_RC2; + *key_len = test_case->key_len; + memcpy(key_bytes, test_case->key, *key_len); + result = CryptImportKey(hProv, blob, size, 0, CRYPT_IPSEC_HMAC_KEY, &key); + todo_wine + ok(result || broken(GetLastError() == NTE_BAD_FLAGS /* Win2k */), "CryptImportKey failed on test case %d: %08x\n", i, GetLastError()); + if (result) + { + HCRYPTHASH hash; + HMAC_INFO hmac_info = { CALG_SHA1, 0 }; + BYTE digest[20]; + DWORD digest_size; + + result = CryptCreateHash(hProv, CALG_HMAC, key, 0, &hash); + ok(result, "CryptCreateHash failed on test case %d: %08x\n", i, GetLastError()); + result = CryptSetHashParam(hash, HP_HMAC_INFO, (BYTE *)&hmac_info, 0); + ok(result, "CryptSetHashParam failed on test case %d: %08x\n", i, GetLastError()); + result = CryptHashData(hash, (const BYTE *)test_case->data, test_case->data_len, 0); + ok(result, "CryptHashData failed on test case %d: %08x\n", i, GetLastError()); + digest_size = sizeof(digest); + result = CryptGetHashParam(hash, HP_HASHVAL, digest, &digest_size, 0); + ok(result, "CryptGetHashParam failed on test case %d: %08x\n", i, GetLastError()); + ok(!memcmp(digest, test_case->digest, sizeof(digest)), "Unexpected valued on test case %d\n", i); + CryptDestroyHash(hash); + CryptDestroyKey(key); + } + HeapFree(GetProcessHeap(), 0, blob); + } + } +} static void test_schannel_provider(void) { @@ -2856,6 +2966,7 @@ START_TEST(rsaenh) test_verify_signature(); test_rsa_encrypt(); test_import_export(); + test_import_hmac(); test_enum_container(); clean_up_base_environment(); test_key_permissions();
1
0
0
0
Michael Stefaniuc : windowscodecs/tests: COM cleanup for converter.c.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: eaf394a9ac4cd2bdf1e6484a723abf5f85026104 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eaf394a9ac4cd2bdf1e6484a7…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 12 00:51:41 2011 +0100 windowscodecs/tests: COM cleanup for converter.c. --- dlls/windowscodecs/tests/converter.c | 76 ++++++++++++++++++---------------- 1 files changed, 40 insertions(+), 36 deletions(-) diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index 408a6ca..a720b4b 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -20,6 +20,7 @@ #include <math.h> #define COBJMACROS +#define CONST_VTABLE #include "windef.h" #include "objbase.h" @@ -37,11 +38,16 @@ typedef struct bitmap_data { } bitmap_data; typedef struct BitmapTestSrc { - const IWICBitmapSourceVtbl *lpVtbl; + IWICBitmapSource IWICBitmapSource_iface; LONG ref; const bitmap_data *data; } BitmapTestSrc; +static inline BitmapTestSrc *impl_from_IWICBitmapSource(IWICBitmapSource *iface) +{ + return CONTAINING_RECORD(iface, BitmapTestSrc, IWICBitmapSource_iface); +} + static HRESULT WINAPI BitmapTestSrc_QueryInterface(IWICBitmapSource *iface, REFIID iid, void **ppv) { @@ -59,14 +65,14 @@ static HRESULT WINAPI BitmapTestSrc_QueryInterface(IWICBitmapSource *iface, REFI static ULONG WINAPI BitmapTestSrc_AddRef(IWICBitmapSource *iface) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); ULONG ref = InterlockedIncrement(&This->ref); return ref; } static ULONG WINAPI BitmapTestSrc_Release(IWICBitmapSource *iface) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); ULONG ref = InterlockedDecrement(&This->ref); return ref; } @@ -74,7 +80,7 @@ static ULONG WINAPI BitmapTestSrc_Release(IWICBitmapSource *iface) static HRESULT WINAPI BitmapTestSrc_GetSize(IWICBitmapSource *iface, UINT *puiWidth, UINT *puiHeight) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); *puiWidth = This->data->width; *puiHeight = This->data->height; return S_OK; @@ -83,7 +89,7 @@ static HRESULT WINAPI BitmapTestSrc_GetSize(IWICBitmapSource *iface, static HRESULT WINAPI BitmapTestSrc_GetPixelFormat(IWICBitmapSource *iface, WICPixelFormatGUID *pPixelFormat) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); memcpy(pPixelFormat, This->data->format, sizeof(GUID)); return S_OK; } @@ -91,7 +97,7 @@ static HRESULT WINAPI BitmapTestSrc_GetPixelFormat(IWICBitmapSource *iface, static HRESULT WINAPI BitmapTestSrc_GetResolution(IWICBitmapSource *iface, double *pDpiX, double *pDpiY) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); *pDpiX = This->data->xres; *pDpiY = This->data->yres; return S_OK; @@ -106,7 +112,7 @@ static HRESULT WINAPI BitmapTestSrc_CopyPalette(IWICBitmapSource *iface, static HRESULT WINAPI BitmapTestSrc_CopyPixels(IWICBitmapSource *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { - BitmapTestSrc *This = (BitmapTestSrc*)iface; + BitmapTestSrc *This = impl_from_IWICBitmapSource(iface); UINT bytesperrow; UINT srcstride; UINT row_offset; @@ -171,26 +177,22 @@ static const IWICBitmapSourceVtbl BitmapTestSrc_Vtbl = { BitmapTestSrc_CopyPixels }; -static void CreateTestBitmap(const bitmap_data *data, IWICBitmapSource **bitmap) +static void CreateTestBitmap(const bitmap_data *data, BitmapTestSrc **This) { - BitmapTestSrc *This = HeapAlloc(GetProcessHeap(), 0, sizeof(BitmapTestSrc)); + *This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); - if (This) + if (*This) { - This->lpVtbl = &BitmapTestSrc_Vtbl; - This->ref = 1; - This->data = data; - *bitmap = (IWICBitmapSource*)This; + (*This)->IWICBitmapSource_iface.lpVtbl = &BitmapTestSrc_Vtbl; + (*This)->ref = 1; + (*This)->data = data; } - else - *bitmap = NULL; } -static void DeleteTestBitmap(IWICBitmapSource *bitmap) +static void DeleteTestBitmap(BitmapTestSrc *This) { - BitmapTestSrc *This = (BitmapTestSrc*)bitmap; - ok(This->lpVtbl == &BitmapTestSrc_Vtbl, "test bitmap %p deleted with incorrect vtable\n", bitmap); - ok(This->ref == 1, "test bitmap %p deleted with %i references instead of 1\n", bitmap, This->ref); + ok(This->IWICBitmapSource_iface.lpVtbl == &BitmapTestSrc_Vtbl, "test bitmap %p deleted with incorrect vtable\n", This); + ok(This->ref == 1, "test bitmap %p deleted with %i references instead of 1\n", This, This->ref); HeapFree(GetProcessHeap(), 0, This); } @@ -289,12 +291,13 @@ static const struct bitmap_data testdata_32bppBGRA = { static void test_conversion(const struct bitmap_data *src, const struct bitmap_data *dst, const char *name, BOOL todo) { - IWICBitmapSource *src_bitmap, *dst_bitmap; + BitmapTestSrc *src_obj; + IWICBitmapSource *dst_bitmap; HRESULT hr; - CreateTestBitmap(src, &src_bitmap); + CreateTestBitmap(src, &src_obj); - hr = WICConvertBitmapSource(dst->format, src_bitmap, &dst_bitmap); + hr = WICConvertBitmapSource(dst->format, &src_obj->IWICBitmapSource_iface, &dst_bitmap); if (todo) todo_wine ok(SUCCEEDED(hr), "WICConvertBitmapSource(%s) failed, hr=%x\n", name, hr); else @@ -307,31 +310,32 @@ static void test_conversion(const struct bitmap_data *src, const struct bitmap_d IWICBitmapSource_Release(dst_bitmap); } - DeleteTestBitmap(src_bitmap); + DeleteTestBitmap(src_obj); } static void test_invalid_conversion(void) { - IWICBitmapSource *src_bitmap, *dst_bitmap; + BitmapTestSrc *src_obj; + IWICBitmapSource *dst_bitmap; HRESULT hr; - CreateTestBitmap(&testdata_32bppBGRA, &src_bitmap); + CreateTestBitmap(&testdata_32bppBGRA, &src_obj); /* convert to a non-pixel-format GUID */ - hr = WICConvertBitmapSource(&GUID_VendorMicrosoft, src_bitmap, &dst_bitmap); + hr = WICConvertBitmapSource(&GUID_VendorMicrosoft, &src_obj->IWICBitmapSource_iface, &dst_bitmap); ok(hr == WINCODEC_ERR_COMPONENTNOTFOUND, "WICConvertBitmapSource returned %x\n", hr); - DeleteTestBitmap(src_bitmap); + DeleteTestBitmap(src_obj); } static void test_default_converter(void) { - IWICBitmapSource *src_bitmap; + BitmapTestSrc *src_obj; IWICFormatConverter *converter; BOOL can_convert=1; HRESULT hr; - CreateTestBitmap(&testdata_32bppBGRA, &src_bitmap); + CreateTestBitmap(&testdata_32bppBGRA, &src_obj); hr = CoCreateInstance(&CLSID_WICDefaultFormatConverter, NULL, CLSCTX_INPROC_SERVER, &IID_IWICFormatConverter, (void**)&converter); @@ -343,7 +347,7 @@ static void test_default_converter(void) ok(SUCCEEDED(hr), "CanConvert returned %x\n", hr); ok(can_convert, "expected TRUE, got %i\n", can_convert); - hr = IWICFormatConverter_Initialize(converter, src_bitmap, + hr = IWICFormatConverter_Initialize(converter, &src_obj->IWICBitmapSource_iface, &GUID_WICPixelFormat32bppBGR, WICBitmapDitherTypeNone, NULL, 0.0, WICBitmapPaletteTypeCustom); ok(SUCCEEDED(hr), "Initialize returned %x\n", hr); @@ -354,7 +358,7 @@ static void test_default_converter(void) IWICFormatConverter_Release(converter); } - DeleteTestBitmap(src_bitmap); + DeleteTestBitmap(src_obj); } static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encoder, @@ -362,7 +366,7 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod { HRESULT hr; IWICBitmapEncoder *encoder; - IWICBitmapSource *src_bitmap; + BitmapTestSrc *src_obj; HGLOBAL hglobal; IStream *stream; IWICBitmapFrameEncode *frameencode; @@ -371,7 +375,7 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod IWICBitmapFrameDecode *framedecode; WICPixelFormatGUID pixelformat; - CreateTestBitmap(src, &src_bitmap); + CreateTestBitmap(src, &src_obj); hr = CoCreateInstance(clsid_encoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapEncoder, (void**)&encoder); @@ -406,7 +410,7 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod hr = IWICBitmapFrameEncode_SetSize(frameencode, src->width, src->height); ok(SUCCEEDED(hr), "SetSize failed, hr=%x\n", hr); - hr = IWICBitmapFrameEncode_WriteSource(frameencode, src_bitmap, NULL); + hr = IWICBitmapFrameEncode_WriteSource(frameencode, &src_obj->IWICBitmapSource_iface, NULL); ok(SUCCEEDED(hr), "WriteSource failed, hr=%x\n", hr); hr = IWICBitmapFrameEncode_Commit(frameencode); @@ -450,7 +454,7 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod IWICBitmapEncoder_Release(encoder); } - DeleteTestBitmap(src_bitmap); + DeleteTestBitmap(src_obj); } START_TEST(converter)
1
0
0
0
Michael Stefaniuc : windowscodecs: Use ifaces instead of vtbl pointers in BmpDecoder.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 2785e905bc568d79e56e7505eb724f8f8ed2172d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2785e905bc568d79e56e7505e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 12 00:49:53 2011 +0100 windowscodecs: Use ifaces instead of vtbl pointers in BmpDecoder. --- dlls/windowscodecs/bmpdecode.c | 59 +++++++++++++++++++++------------------ 1 files changed, 32 insertions(+), 27 deletions(-) diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c index bd0ace1..6da6a3c 100644 --- a/dlls/windowscodecs/bmpdecode.c +++ b/dlls/windowscodecs/bmpdecode.c @@ -62,8 +62,8 @@ typedef struct { typedef HRESULT (*ReadDataFunc)(BmpDecoder* This); struct BmpDecoder { - const IWICBitmapDecoderVtbl *lpVtbl; - const IWICBitmapFrameDecodeVtbl *lpFrameVtbl; + IWICBitmapDecoder IWICBitmapDecoder_iface; + IWICBitmapFrameDecode IWICBitmapFrameDecode_iface; LONG ref; BOOL initialized; IStream *stream; @@ -81,9 +81,14 @@ struct BmpDecoder { int icoframe; /* If TRUE, this is a frame of a .ico file. */ }; -static inline BmpDecoder *impl_from_frame(IWICBitmapFrameDecode *iface) +static inline BmpDecoder *impl_from_IWICBitmapDecoder(IWICBitmapDecoder *iface) { - return CONTAINING_RECORD(iface, BmpDecoder, lpFrameVtbl); + return CONTAINING_RECORD(iface, BmpDecoder, IWICBitmapDecoder_iface); +} + +static inline BmpDecoder *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDecode *iface) +{ + return CONTAINING_RECORD(iface, BmpDecoder, IWICBitmapFrameDecode_iface); } static HRESULT WINAPI BmpFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid, @@ -111,22 +116,22 @@ static HRESULT WINAPI BmpFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface static ULONG WINAPI BmpFrameDecode_AddRef(IWICBitmapFrameDecode *iface) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); - return IUnknown_AddRef((IUnknown*)This); + return IWICBitmapDecoder_AddRef(&This->IWICBitmapDecoder_iface); } static ULONG WINAPI BmpFrameDecode_Release(IWICBitmapFrameDecode *iface) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); - return IUnknown_Release((IUnknown*)This); + return IWICBitmapDecoder_Release(&This->IWICBitmapDecoder_iface); } static HRESULT WINAPI BmpFrameDecode_GetSize(IWICBitmapFrameDecode *iface, UINT *puiWidth, UINT *puiHeight) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight); if (This->bih.bV5Size == sizeof(BITMAPCOREHEADER)) @@ -146,7 +151,7 @@ static HRESULT WINAPI BmpFrameDecode_GetSize(IWICBitmapFrameDecode *iface, static HRESULT WINAPI BmpFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface, WICPixelFormatGUID *pPixelFormat) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); TRACE("(%p,%p)\n", iface, pPixelFormat); memcpy(pPixelFormat, This->pixelformat, sizeof(GUID)); @@ -177,7 +182,7 @@ static HRESULT BmpHeader_GetResolution(BITMAPV5HEADER *bih, double *pDpiX, doubl static HRESULT WINAPI BmpFrameDecode_GetResolution(IWICBitmapFrameDecode *iface, double *pDpiX, double *pDpiY) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); TRACE("(%p,%p,%p)\n", iface, pDpiX, pDpiY); return BmpHeader_GetResolution(&This->bih, pDpiX, pDpiY); @@ -187,7 +192,7 @@ static HRESULT WINAPI BmpFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, IWICPalette *pIPalette) { HRESULT hr; - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); int count; WICColor *wiccolors=NULL; RGBTRIPLE *bgrcolors=NULL; @@ -299,7 +304,7 @@ end: static HRESULT WINAPI BmpFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) { - BmpDecoder *This = impl_from_frame(iface); + BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface); HRESULT hr=S_OK; UINT width, height; TRACE("(%p,%p,%u,%u,%p)\n", iface, prc, cbStride, cbBufferSize, pbBuffer); @@ -403,7 +408,7 @@ static HRESULT BmpFrameDecode_ReadRGB8(BmpDecoder* This) HRESULT hr; UINT width, height; - hr = IWICBitmapFrameDecode_GetSize((IWICBitmapFrameDecode*)&This->lpFrameVtbl, &width, &height); + hr = IWICBitmapFrameDecode_GetSize(&This->IWICBitmapFrameDecode_iface, &width, &height); if (SUCCEEDED(hr)) { @@ -954,7 +959,7 @@ static HRESULT BmpDecoder_ReadHeaders(BmpDecoder* This, IStream *stream) static HRESULT WINAPI BmpDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID iid, void **ppv) { - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); if (!ppv) return E_INVALIDARG; @@ -975,7 +980,7 @@ static HRESULT WINAPI BmpDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID static ULONG WINAPI BmpDecoder_AddRef(IWICBitmapDecoder *iface) { - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) refcount=%u\n", iface, ref); @@ -985,7 +990,7 @@ static ULONG WINAPI BmpDecoder_AddRef(IWICBitmapDecoder *iface) static ULONG WINAPI BmpDecoder_Release(IWICBitmapDecoder *iface) { - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) refcount=%u\n", iface, ref); @@ -1006,7 +1011,7 @@ static HRESULT WINAPI BmpDecoder_QueryCapability(IWICBitmapDecoder *iface, IStre DWORD *pdwCapability) { HRESULT hr; - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); EnterCriticalSection(&This->lock); hr = BmpDecoder_ReadHeaders(This, pIStream); @@ -1025,7 +1030,7 @@ static HRESULT WINAPI BmpDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p WICDecodeOptions cacheOptions) { HRESULT hr; - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); EnterCriticalSection(&This->lock); hr = BmpDecoder_ReadHeaders(This, pIStream); @@ -1112,13 +1117,13 @@ static HRESULT WINAPI BmpDecoder_GetFrameCount(IWICBitmapDecoder *iface, static HRESULT WINAPI BmpDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { - BmpDecoder *This = (BmpDecoder*)iface; + BmpDecoder *This = impl_from_IWICBitmapDecoder(iface); if (index != 0) return E_INVALIDARG; if (!This->stream) return WINCODEC_ERR_WRONGSTATE; - *ppIBitmapFrame = (IWICBitmapFrameDecode*)&This->lpFrameVtbl; + *ppIBitmapFrame = &This->IWICBitmapFrameDecode_iface; IWICBitmapDecoder_AddRef(iface); return S_OK; @@ -1148,8 +1153,8 @@ static HRESULT BmpDecoder_Create(int packed, int icoframe, BmpDecoder **ppDecode This = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpDecoder)); if (!This) return E_OUTOFMEMORY; - This->lpVtbl = &BmpDecoder_Vtbl; - This->lpFrameVtbl = &BmpDecoder_FrameVtbl; + This->IWICBitmapDecoder_iface.lpVtbl = &BmpDecoder_Vtbl; + This->IWICBitmapFrameDecode_iface.lpVtbl = &BmpDecoder_FrameVtbl; This->ref = 1; This->initialized = FALSE; This->stream = NULL; @@ -1178,8 +1183,8 @@ static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOute ret = BmpDecoder_Create(packed, icoframe, &This); if (FAILED(ret)) return ret; - ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv); - IUnknown_Release((IUnknown*)This); + ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv); + IWICBitmapDecoder_Release(&This->IWICBitmapDecoder_iface); return ret; } @@ -1201,7 +1206,7 @@ HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder) void BmpDecoder_GetWICDecoder(BmpDecoder *This, IWICBitmapDecoder **ppDecoder) { - *ppDecoder = (IWICBitmapDecoder*)This; + *ppDecoder = &This->IWICBitmapDecoder_iface; } /* Return the offset where the mask of an icon might be, or 0 for failure. */ @@ -1213,7 +1218,7 @@ void BmpDecoder_FindIconMask(BmpDecoder *This, ULONG *mask_offset, int *topdown) { /* RGB or BITFIELDS data */ ULONG width, height, bytesperrow, datasize; - IWICBitmapFrameDecode_GetSize((IWICBitmapFrameDecode*)&This->lpFrameVtbl, &width, &height); + IWICBitmapFrameDecode_GetSize(&This->IWICBitmapFrameDecode_iface, &width, &height); bytesperrow = (((width * This->bitsperpixel)+31)/32)*4; datasize = bytesperrow * height; *mask_offset = This->image_offset + datasize;
1
0
0
0
Michael Stefaniuc : urlmon: COM cleanup for the rest of the iface in BindProtocol.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 1515b36aaafd851dbe86aec71dee2aed296e098e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1515b36aaafd851dbe86aec71…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 12 00:47:19 2011 +0100 urlmon: COM cleanup for the rest of the iface in BindProtocol. --- dlls/urlmon/bindprot.c | 127 +++++++++++++++++++++++---------------------- dlls/urlmon/urlmon_main.h | 10 ++-- 2 files changed, 70 insertions(+), 67 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1515b36aaafd851dbe86a…
1
0
0
0
Michael Stefaniuc : urlmon: COM cleanup for the IInternetProtocolEx iface.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: c41cf7d6a5c22bd22aac842995bed46c7867ab44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c41cf7d6a5c22bd22aac84299…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 12 00:43:44 2011 +0100 urlmon: COM cleanup for the IInternetProtocolEx iface. --- dlls/urlmon/binding.c | 24 +++++++------ dlls/urlmon/bindprot.c | 87 +++++++++++++++++++++++---------------------- dlls/urlmon/session.c | 2 +- dlls/urlmon/urlmon_main.h | 4 +-- 4 files changed, 59 insertions(+), 58 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c41cf7d6a5c22bd22aac8…
1
0
0
0
Alexandre Julliard : winedump: Try to load the PDB string table from file number 4 too.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 4f574ee942be99c7401a3bef472a81d0f2bb0b5b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f574ee942be99c7401a3bef4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 12 10:45:54 2011 +0100 winedump: Try to load the PDB string table from file number 4 too. --- tools/winedump/pdb.c | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index 5720c40..1b7beeb 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -155,6 +155,21 @@ static void pdb_exit(struct pdb_reader* reader) free((char*)reader->u.ds.toc); } +static void *read_string_table(struct pdb_reader* reader) +{ + void *ret; + + /* FIXME: how to determine the correct file number? */ + /* 4 and 12 have been observed, there may be others */ + ret = reader->read_file(reader, 4); + if (ret && *(const DWORD*)ret == 0xeffeeffe) return ret; + free( ret ); + ret = reader->read_file(reader, 12); + if (ret && *(const DWORD*)ret == 0xeffeeffe) return ret; + free( ret ); + return NULL; +} + static void pdb_dump_symbols(struct pdb_reader* reader) { PDB_SYMBOLS* symbols; @@ -224,20 +239,8 @@ static void pdb_dump_symbols(struct pdb_reader* reader) dump_data(src, symbols->offset_size, " "); } - filesimage = reader->read_file(reader, 12); /* FIXME: really fixed ??? */ - if (filesimage) - { - if (*(const DWORD*)filesimage == 0xeffeeffe) - { - filessize = *(const DWORD*)(filesimage + 8); - } - else - { - printf("wrong header %x expecting 0xeffeeffe\n", *(const DWORD*)filesimage); - free(filesimage); - filesimage = NULL; - } - } + if (!(filesimage = read_string_table(reader))) printf("string table not found\n"); + else filessize = *(const DWORD*)(filesimage + 8); if (symbols->srcmodule_size) { @@ -721,6 +724,7 @@ static void pdb_ds_dump(void) * 1: root structure * 2: types * 3: modules + * 4: string table (FIXME: in which case?) * 5: FPO data * 8: segments * 10: extended FPO data
1
0
0
0
Alexandre Julliard : dbghelp: Try to load the string table from file number 4 too.
by Alexandre Julliard
12 Jan '11
12 Jan '11
Module: wine Branch: master Commit: 530e9c9b175c03f7592eaabdf8c34f45be50117a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=530e9c9b175c03f7592eaabdf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 11 20:34:46 2011 +0100 dbghelp: Try to load the string table from file number 4 too. --- dlls/dbghelp/msc.c | 46 +++++++++++++++++++++------------------------- 1 files changed, 21 insertions(+), 25 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 93eef21..0514bc9 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2119,12 +2119,8 @@ static void* pdb_read_ds_file(const struct PDB_DS_HEADER* pdb, DWORD i; if (!toc || file_nr >= toc->num_files) return NULL; + if (toc->file_size[file_nr] == 0 || toc->file_size[file_nr] == 0xFFFFFFFF) return NULL; - if (toc->file_size[file_nr] == 0 || toc->file_size[file_nr] == 0xFFFFFFFF) - { - FIXME(">>> requesting NULL stream (%u)\n", file_nr); - return NULL; - } block_list = &toc->file_size[toc->num_files]; for (i = 0; i < file_nr; i++) block_list += (toc->file_size[i] + pdb->block_size - 1) / pdb->block_size; @@ -2177,6 +2173,23 @@ static void pdb_free_file(struct pdb_file_info* pdb_file) } } +static void* pdb_read_strings(const struct pdb_file_info* pdb_file) +{ + void *ret; + + /* FIXME: how to determine the correct file number? */ + /* 4 and 12 have been observed, there may be others */ + + ret = pdb_read_file( pdb_file, 4 ); + if (ret && *(const DWORD *)ret == 0xeffeeffe) return ret; + pdb_free( ret ); + ret = pdb_read_file( pdb_file, 12 ); + if (ret && *(const DWORD *)ret == 0xeffeeffe) return ret; + pdb_free( ret ); + WARN("string table not found\n"); + return NULL; +} + static void pdb_module_remove(struct process* pcsn, struct module_format* modfmt) { unsigned i; @@ -2596,20 +2609,8 @@ static BOOL pdb_process_internal(const struct process* pcs, symbols.version, symbols.version); } - files_image = pdb_read_file(pdb_file, 12); /* FIXME: really fixed ??? */ - if (files_image) - { - if (*(const DWORD*)files_image == 0xeffeeffe) - { - files_size = *(const DWORD*)(files_image + 8); - } - else - { - WARN("wrong header %x expecting 0xeffeeffe\n", *(const DWORD*)files_image); - pdb_free(files_image); - files_image = NULL; - } - } + files_image = pdb_read_strings(pdb_file); + if (files_image) files_size = *(const DWORD*)(files_image + 8); pdb_process_symbol_imports(pcs, msc_dbg, &symbols, symbols_image, image, pdb_lookup, pdb_module_info, module_index); @@ -3015,13 +3016,8 @@ BOOL pdb_virtual_unwind(struct cpu_stack_walk* csw, DWORD_PTR ip, TRACE("searching %lx => %lx\n", ip, ip - (DWORD_PTR)pair.effective->module.BaseOfImage); ip -= (DWORD_PTR)pair.effective->module.BaseOfImage; - strbase = pdb_read_file(&pdb_info->pdb_files[0], 12); /* FIXME: really fixed index ??? */ + strbase = pdb_read_strings(&pdb_info->pdb_files[0]); if (!strbase) return FALSE; - if (*(const DWORD*)strbase != 0xeffeeffe) - { - pdb_free(strbase); - return FALSE; - } strsize = *(const DWORD*)(strbase + 8); fpoext = pdb_read_file(&pdb_info->pdb_files[0], 10); size = pdb_get_file_size(&pdb_info->pdb_files[0], 10);
1
0
0
0
Alexandre Julliard : winedump: Don't crash when the PDB filenames table isn 't found.
by Alexandre Julliard
11 Jan '11
11 Jan '11
Module: wine Branch: master Commit: e421ff6b6fbc7ba6e3e603a8f70b2e2d56a6a3ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e421ff6b6fbc7ba6e3e603a8f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 11 14:42:21 2011 +0100 winedump: Don't crash when the PDB filenames table isn't found. --- tools/winedump/pdb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index 3cc8882..4568d29 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -440,7 +440,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader) */ codeview_dump_linetab2((const char*)modimage + symbol_size + lineno_size, total_size - (symbol_size + lineno_size), - filesimage + 12, filessize, " "); + filesimage ? filesimage + 12 : NULL, filessize, " "); /* what's that part ??? */ if (0) dump_data(modimage + symbol_size + lineno_size, total_size - (symbol_size + lineno_size), " ");
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200