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
March 2019
----- 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
1097 discussions
Start a n
N
ew thread
Stefan Dösinger : ntdll: Avoid more race conditions in RtlDeregisterWaitEx.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 8f7aafa9e5ab0ba8f588a356df22240f947dbd43 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8f7aafa9e5ab0ba8f588a356…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun Oct 28 22:14:14 2018 +0100 ntdll: Avoid more race conditions in RtlDeregisterWaitEx. af35aada9b078f8dc71dcc85e505da8eee4571da left some issues unfixed. Instead of running the callback and returning a retval that indicates the callback is not running, we sometimes wait for it when we are not supposed to. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 759e6f1d8d5c531291440299bad0c1ab5ae53d05) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/threadpool.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 1b0546a..bf7449c 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -81,7 +81,7 @@ struct wait_work_item ULONG Flags; HANDLE CompletionEvent; LONG DeleteCount; - BOOLEAN CallbackInProgress; + int CallbackInProgress; }; struct timer_queue; @@ -530,9 +530,14 @@ static DWORD CALLBACK wait_thread_proc(LPVOID Arg) wait_work_item->Context ); TimerOrWaitFired = TRUE; } - wait_work_item->CallbackInProgress = TRUE; + interlocked_xchg( &wait_work_item->CallbackInProgress, TRUE ); + if (wait_work_item->CompletionEvent) + { + TRACE( "Work has been canceled.\n" ); + break; + } wait_work_item->Callback( wait_work_item->Context, TimerOrWaitFired ); - wait_work_item->CallbackInProgress = FALSE; + interlocked_xchg( &wait_work_item->CallbackInProgress, FALSE ); if (wait_work_item->Flags & WT_EXECUTEONLYONCE) break; @@ -546,7 +551,8 @@ static DWORD CALLBACK wait_thread_proc(LPVOID Arg) { completion_event = wait_work_item->CompletionEvent; delete_wait_work_item( wait_work_item ); - if (completion_event) NtSetEvent( completion_event, NULL ); + if (completion_event && completion_event != INVALID_HANDLE_VALUE) + NtSetEvent( completion_event, NULL ); } return 0; @@ -637,14 +643,16 @@ NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE WaitHandle, HANDLE CompletionEvent) struct wait_work_item *wait_work_item = WaitHandle; NTSTATUS status; HANDLE LocalEvent = NULL; - BOOLEAN CallbackInProgress; + int CallbackInProgress; TRACE( "(%p %p)\n", WaitHandle, CompletionEvent ); if (WaitHandle == NULL) return STATUS_INVALID_HANDLE; + interlocked_xchg_ptr( &wait_work_item->CompletionEvent, INVALID_HANDLE_VALUE ); CallbackInProgress = wait_work_item->CallbackInProgress; + TRACE( "callback in progress %u\n", CallbackInProgress ); if (CompletionEvent == INVALID_HANDLE_VALUE || !CallbackInProgress) { status = NtCreateEvent( &LocalEvent, EVENT_ALL_ACCESS, NULL, NotificationEvent, FALSE ); @@ -666,6 +674,7 @@ NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE WaitHandle, HANDLE CompletionEvent) } else if (LocalEvent) { + TRACE( "Waiting for completion event\n" ); NtWaitForSingleObject( LocalEvent, FALSE, NULL ); status = STATUS_SUCCESS; }
1
0
0
0
Nikolay Sivov : wincodecs: Add IWICPixelFormatInfo exports.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 4adec15f07e003e35463d207b01ffcb1831656c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4adec15f07e003e35463d207…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Sep 30 14:05:57 2018 +0300 wincodecs: Add IWICPixelFormatInfo exports. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 06495200af280197cd71f3d1714673b49335f50e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/windowscodecs/proxy.c | 15 +++++++++++++++ dlls/windowscodecs/windowscodecs.spec | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/proxy.c b/dlls/windowscodecs/proxy.c index d53059e..34b618e 100644 --- a/dlls/windowscodecs/proxy.c +++ b/dlls/windowscodecs/proxy.c @@ -626,6 +626,21 @@ HRESULT WINAPI IWICStream_InitializeFromMemory_Proxy_W(IWICStream *iface, return IWICStream_InitializeFromMemory(iface, pbBuffer, cbBufferSize); } +HRESULT WINAPI IWICPixelFormatInfo_GetBitsPerPixel_Proxy_W(IWICPixelFormatInfo *iface, UINT *bpp) +{ + return IWICPixelFormatInfo_GetBitsPerPixel(iface, bpp); +} + +HRESULT WINAPI IWICPixelFormatInfo_GetChannelCount_Proxy_W(IWICPixelFormatInfo *iface, UINT *count) +{ + return IWICPixelFormatInfo_GetChannelCount(iface, count); +} + +HRESULT WINAPI IWICPixelFormatInfo_GetChannelMask_Proxy_W(IWICPixelFormatInfo *iface, UINT channel, UINT buffer_size, BYTE *buffer, UINT *actual) +{ + return IWICPixelFormatInfo_GetChannelMask(iface, channel, buffer_size, buffer, actual); +} + HRESULT WINAPI WICCreateColorContext_Proxy(IWICImagingFactory *iface, IWICColorContext **ppIWICColorContext) { TRACE("%p, %p\n", iface, ppIWICColorContext); diff --git a/dlls/windowscodecs/windowscodecs.spec b/dlls/windowscodecs/windowscodecs.spec index 49346fc..fb19b1e 100644 --- a/dlls/windowscodecs/windowscodecs.spec +++ b/dlls/windowscodecs/windowscodecs.spec @@ -99,9 +99,9 @@ @ stdcall IWICPalette_InitializeFromBitmap_Proxy(ptr ptr long long) IWICPalette_InitializeFromBitmap_Proxy_W @ stdcall IWICPalette_InitializeFromPalette_Proxy(ptr ptr) IWICPalette_InitializeFromPalette_Proxy_W @ stdcall IWICPalette_InitializePredefined_Proxy(ptr long long) IWICPalette_InitializePredefined_Proxy_W -@ stub IWICPixelFormatInfo_GetBitsPerPixel_Proxy -@ stub IWICPixelFormatInfo_GetChannelCount_Proxy -@ stub IWICPixelFormatInfo_GetChannelMask_Proxy +@ stdcall IWICPixelFormatInfo_GetBitsPerPixel_Proxy(ptr ptr) IWICPixelFormatInfo_GetBitsPerPixel_Proxy_W +@ stdcall IWICPixelFormatInfo_GetChannelCount_Proxy(ptr ptr) IWICPixelFormatInfo_GetChannelCount_Proxy_W +@ stdcall IWICPixelFormatInfo_GetChannelMask_Proxy(ptr long long ptr ptr) IWICPixelFormatInfo_GetChannelMask_Proxy_W @ stdcall IWICStream_InitializeFromIStream_Proxy(ptr ptr) IWICStream_InitializeFromIStream_Proxy_W @ stdcall IWICStream_InitializeFromMemory_Proxy(ptr ptr long) IWICStream_InitializeFromMemory_Proxy_W @ stdcall WICConvertBitmapSource(ptr ptr ptr)
1
0
0
0
Nikolay Sivov : wincodecs/icoformat: Improve input data validation on decoder initialization.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 3ae5ad14c755731e57fc7071133b360e44563a90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3ae5ad14c755731e57fc7071…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 9 09:41:49 2018 +0300 wincodecs/icoformat: Improve input data validation on decoder initialization. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e72983b5124eba463f76bc5c5de1dae2485ef42e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/windowscodecs/icoformat.c | 34 +++++- dlls/windowscodecs/tests/icoformat.c | 207 ++++++++++++++++++++++++----------- 2 files changed, 173 insertions(+), 68 deletions(-) diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index 1b1c792..7813f69 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -511,6 +511,9 @@ static HRESULT WINAPI IcoDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p LARGE_INTEGER seek; HRESULT hr; ULONG bytesread; + STATSTG statstg; + unsigned int i; + TRACE("(%p,%p,%x)\n", iface, pIStream, cacheOptions); EnterCriticalSection(&This->lock); @@ -527,14 +530,41 @@ static HRESULT WINAPI IcoDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p hr = IStream_Read(pIStream, &This->header, sizeof(ICONHEADER), &bytesread); if (FAILED(hr)) goto end; - if (bytesread != sizeof(ICONHEADER) || - This->header.idReserved != 0 || + + if (bytesread != sizeof(ICONHEADER)) + { + hr = WINCODEC_ERR_STREAMREAD; + goto end; + } + + if (This->header.idReserved != 0 || This->header.idType != 1) { hr = E_FAIL; goto end; } + hr = IStream_Stat(pIStream, &statstg, STATFLAG_NONAME); + if (FAILED(hr)) + { + WARN("Stat() failed, hr %#x.\n", hr); + goto end; + } + + for (i = 0; i < This->header.idCount; i++) + { + ICONDIRENTRY direntry; + + hr = IStream_Read(pIStream, &direntry, sizeof(direntry), &bytesread); + if (FAILED(hr)) goto end; + + if (bytesread != sizeof(direntry) || (direntry.dwDIBSize + direntry.dwDIBOffset > statstg.cbSize.QuadPart)) + { + hr = WINCODEC_ERR_BADIMAGE; + goto end; + } + } + This->initialized = TRUE; This->stream = pIStream; IStream_AddRef(pIStream); diff --git a/dlls/windowscodecs/tests/icoformat.c b/dlls/windowscodecs/tests/icoformat.c index c53739d..38db51c 100644 --- a/dlls/windowscodecs/tests/icoformat.c +++ b/dlls/windowscodecs/tests/icoformat.c @@ -26,72 +26,114 @@ #include "wincodec.h" #include "wine/test.h" -static unsigned char testico_bad_icondirentry_size[] = { - /* ICONDIR */ - 0, 0, /* reserved */ - 1, 0, /* type */ - 1, 0, /* count */ +#include "pshpack1.h" + +struct ICONHEADER +{ + WORD idReserved; + WORD idType; + WORD idCount; +}; + +struct ICONDIRENTRY +{ + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; + WORD wPlanes; + WORD wBitCount; + DWORD dwDIBSize; + DWORD dwDIBOffset; +}; + +struct test_ico +{ + struct ICONHEADER header; + struct ICONDIRENTRY direntry; + BITMAPINFOHEADER bmi; + unsigned char data[512]; +}; + +static const struct test_ico ico_1 = +{ + /* ICONHEADER */ + { + 0, /* reserved */ + 1, /* type */ + 1, /* count */ + }, /* ICONDIRENTRY */ - 2, /* width */ - 2, /* height */ - 2, /* colorCount */ - 0, /* reserved */ - 1,0, /* planes */ - 8,0, /* bitCount */ - (40+2*4+16*16+16*4) & 0xFF,((40+2*4+16*16+16*4) >> 8) & 0xFF,0,0, /* bytesInRes */ - 22,0,0,0, /* imageOffset */ + { + 16, /* width */ + 16, /* height */ + 2, /* color count */ + 0, /* reserved */ + 1, /* planes */ + 8, /* bitcount*/ + 40 + 2*4 + 16 * 16 + 16 * 4, /* data size */ + 22 /* data offset */ + }, /* BITMAPINFOHEADER */ - 40,0,0,0, /* header size */ - 16,0,0,0, /* width */ - 2*16,0,0,0, /* height (XOR+AND rows) */ - 1,0, /* planes */ - 8,0, /* bit count */ - 0,0,0,0, /* compression */ - 0,0,0,0, /* sizeImage */ - 0,0,0,0, /* x pels per meter */ - 0,0,0,0, /* y pels per meter */ - 2,0,0,0, /* clrUsed */ - 0,0,0,0, /* clrImportant */ - /* palette */ - 0,0,0,0, - 0xFF,0xFF,0xFF,0, - /* XOR mask */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, - 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, - 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, - 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, - 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, - 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, - 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0, - 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0, - 0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0, - 0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0, - 0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - /* AND mask */ - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0, - 0,0,0,0 + { + sizeof(BITMAPINFOHEADER), /* header size */ + 16, /* width */ + 2*16, /* height (XOR+AND rows) */ + 1, /* planes */ + 8, /* bit count */ + 0, /* compression */ + 0, /* sizeImage */ + 0, /* x pels per meter */ + 0, /* y pels per meter */ + 2, /* clrUsed */ + 0, /* clrImportant */ + }, + { + /* palette */ + 0,0,0,0, + 0xFF,0xFF,0xFF,0, + /* XOR mask */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0, + 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0, + 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0, + 0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0, + 0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0, + 0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + /* AND mask */ + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0 + } }; -static void test_bad_icondirentry_size(void) +#include "poppack.h" + +#define test_ico_data(a, b, c) test_ico_data_(a, b, c, 0, __LINE__) +#define test_ico_data_todo(a, b, c) test_ico_data_(a, b, c, 1, __LINE__) +static void test_ico_data_(void *data, DWORD data_size, HRESULT init_hr, int todo, unsigned int line) { IWICBitmapDecoder *decoder; IWICImagingFactory *factory; @@ -108,8 +150,7 @@ static void test_bad_icondirentry_size(void) ok(hr == S_OK, "CreateStream failed, hr=%x\n", hr); if (SUCCEEDED(hr)) { - hr = IWICStream_InitializeFromMemory(icostream, testico_bad_icondirentry_size, - sizeof(testico_bad_icondirentry_size)); + hr = IWICStream_InitializeFromMemory(icostream, data, data_size); ok(hr == S_OK, "InitializeFromMemory failed, hr=%x\n", hr); if (SUCCEEDED(hr)) @@ -123,7 +164,8 @@ static void test_bad_icondirentry_size(void) { hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)icostream, WICDecodeMetadataCacheOnDemand); - ok(hr == S_OK, "Initialize failed, hr=%x\n", hr); + todo_wine_if(todo) + ok_(__FILE__, line)(hr == init_hr, "Initialize failed, hr=%x\n", hr); if (SUCCEEDED(hr)) { @@ -163,11 +205,44 @@ static void test_bad_icondirentry_size(void) IWICImagingFactory_Release(factory); } +static void test_decoder(void) +{ + struct test_ico ico; + + /* Icon size specified in ICONDIRENTRY does not match bitmap header. */ + ico = ico_1; + ico.direntry.bWidth = 2; + ico.direntry.bHeight = 2; + test_ico_data(&ico, sizeof(ico), S_OK); + + /* Invalid DIRENTRY data size/offset. */ + ico = ico_1; + ico.direntry.dwDIBOffset = sizeof(ico); + test_ico_data(&ico, sizeof(ico), WINCODEC_ERR_BADIMAGE); + + ico = ico_1; + ico.direntry.dwDIBSize = sizeof(ico); + test_ico_data(&ico, sizeof(ico), WINCODEC_ERR_BADIMAGE); + + /* Header fields validation. */ + ico = ico_1; + ico.header.idReserved = 1; + test_ico_data_todo(&ico, sizeof(ico), S_OK); + ico.header.idReserved = 0; + ico.header.idType = 100; + test_ico_data_todo(&ico, sizeof(ico), S_OK); + + /* Premature end of data. */ + ico = ico_1; + test_ico_data(&ico, sizeof(ico.header) - 1, WINCODEC_ERR_STREAMREAD); + test_ico_data(&ico, sizeof(ico.header) + sizeof(ico.direntry) - 1, WINCODEC_ERR_BADIMAGE); +} + START_TEST(icoformat) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - test_bad_icondirentry_size(); + test_decoder(); CoUninitialize(); }
1
0
0
0
Nikolay Sivov : wincodecs: Add IWICImagingFactory2 stub.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 441e5705270a8bcc766274a41d0e9070cdc97b24 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=441e5705270a8bcc766274a4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Sep 30 14:05:56 2018 +0300 wincodecs: Add IWICImagingFactory2 stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 82c82e8c45c50b7e73b6290cbbdfb66d886515d8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/windowscodecs/clsfactory.c | 3 +- dlls/windowscodecs/imgfactory.c | 330 ++++++++++++++++++++++++++++----- dlls/windowscodecs/pngformat.c | 2 +- dlls/windowscodecs/proxy.c | 2 +- dlls/windowscodecs/tests/info.c | 33 ++++ dlls/windowscodecs/wincodecs_private.h | 2 +- 6 files changed, 322 insertions(+), 50 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=441e5705270a8bcc7662…
1
0
0
0
Alexandre Julliard : user32: Use height from font metrics for empty text runs in TabbedTextOut().
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 2ef6e07c4b1303a9f0f27880505a7998caa2a3c6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ef6e07c4b1303a9f0f27880…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 8 13:20:36 2018 +0200 user32: Use height from font metrics for empty text runs in TabbedTextOut(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=39051
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 5d282ec64d1ad815586adcd57ff494b524ed1064) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/text.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/user32/text.c b/dlls/user32/text.c index 2ac3afd..66cec61 100644 --- a/dlls/user32/text.c +++ b/dlls/user32/text.c @@ -1387,7 +1387,9 @@ static LONG TEXT_TabbedTextOut( HDC hdc, INT x, INT y, LPCWSTR lpstr, } } else x += extent.cx; - + + if (!extent.cy) extent.cy = tm.tmHeight; + if (fDisplayText) { r.top = y; @@ -1400,9 +1402,6 @@ static LONG TEXT_TabbedTextOut( HDC hdc, INT x, INT y, LPCWSTR lpstr, lpstr += j; } - if(!extent.cy) - extent.cy = tm.tmHeight; - return MAKELONG(x - start, extent.cy); }
1
0
0
0
Louis Lenders : wevtapi: Fix typo in spec file.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: a1d12c31300aab9495d7f05dd3b1362b6578fca8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a1d12c31300aab9495d7f05d…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Mon Oct 1 00:18:02 2018 +0200 wevtapi: Fix typo in spec file. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45910
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0892cdf761a2f0320b1b59c39bed43e4c8a5476a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wevtapi/wevtapi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wevtapi/wevtapi.spec b/dlls/wevtapi/wevtapi.spec index 7e6f15d..e5dd0e7 100644 --- a/dlls/wevtapi/wevtapi.spec +++ b/dlls/wevtapi/wevtapi.spec @@ -4,7 +4,7 @@ @ stdcall EvtClose(ptr) @ stub EvtCreateBookmark @ stub EvtCreateRenderContext -@ stub EvtExportLog(ptr wstr wstr wstr long) +@ stdcall EvtExportLog(ptr wstr wstr wstr long) @ stub EvtFormatMessage @ stdcall EvtGetChannelConfigProperty(ptr long long long ptr ptr) @ stub EvtGetEventInfo
1
0
0
0
Louis Lenders : wevtapi: Add stub for EvtExportLog.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: e8ed33af8775624fd948f52ce82bca8a706b15db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e8ed33af8775624fd948f52c…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Fri Mar 23 13:23:57 2018 +0100 wevtapi: Add stub for EvtExportLog. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ecbb4fa3ea2d3a9e1d3f560c7e0dea008439db5b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wevtapi/main.c | 7 +++++++ dlls/wevtapi/wevtapi.spec | 2 +- include/winevt.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/wevtapi/main.c b/dlls/wevtapi/main.c index a978437..9c8bb5d 100644 --- a/dlls/wevtapi/main.c +++ b/dlls/wevtapi/main.c @@ -122,3 +122,10 @@ BOOL WINAPI EvtNext(EVT_HANDLE result_set, DWORD size, EVT_HANDLE *array, DWORD SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +BOOL WINAPI EvtExportLog(EVT_HANDLE session, const WCHAR *path, const WCHAR *query, const WCHAR *file, DWORD flags) +{ + FIXME("(%p %s %s %s %#x) stub!\n", session, debugstr_w(path), debugstr_w(query), debugstr_w(file), flags); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} diff --git a/dlls/wevtapi/wevtapi.spec b/dlls/wevtapi/wevtapi.spec index ddd2f32..7e6f15d 100644 --- a/dlls/wevtapi/wevtapi.spec +++ b/dlls/wevtapi/wevtapi.spec @@ -4,7 +4,7 @@ @ stdcall EvtClose(ptr) @ stub EvtCreateBookmark @ stub EvtCreateRenderContext -@ stub EvtExportLog +@ stub EvtExportLog(ptr wstr wstr wstr long) @ stub EvtFormatMessage @ stdcall EvtGetChannelConfigProperty(ptr long long long ptr ptr) @ stub EvtGetEventInfo diff --git a/include/winevt.h b/include/winevt.h index 6d2ef1a..a37954f 100644 --- a/include/winevt.h +++ b/include/winevt.h @@ -114,7 +114,8 @@ typedef struct _EVT_VARIANT { typedef DWORD (WINAPI *EVT_SUBSCRIBE_CALLBACK)(EVT_SUBSCRIBE_NOTIFY_ACTION Action, PVOID UserContext, EVT_HANDLE Event); - +BOOL WINAPI EvtExportLog(EVT_HANDLE session, const WCHAR *path, const WCHAR *query, + const WCHAR *file, DWORD flags); BOOL WINAPI EvtGetChannelConfigProperty(EVT_HANDLE ChannelConfig, EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId, DWORD Flags, DWORD PropertyValueBufferSize,
1
0
0
0
Piotr Caban : msvcr100: Added _Scoped_lock::_NonReentrantPPLLock class.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: f914e4fb690665e7d347b7b8b08cd63c68ea635a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f914e4fb690665e7d347b7b8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Oct 3 17:23:50 2018 +0200 msvcr100: Added _Scoped_lock::_NonReentrantPPLLock class. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c3445197b2575556e0bb789198b8abf45f3573cd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/concrt140/concrt140.spec | 8 ++++---- dlls/msvcr100/msvcr100.spec | 8 ++++---- dlls/msvcr110/msvcr110.spec | 12 ++++++------ dlls/msvcr120/msvcr120.spec | 12 ++++++------ dlls/msvcr120_app/msvcr120_app.spec | 12 ++++++------ dlls/msvcrt/lock.c | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 61 insertions(+), 26 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f914e4fb690665e7d347…
1
0
0
0
Piotr Caban : msvcr100: Add _ReentrantPPLLock:: _Scoped_lock class implementation.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: b5f01f861403ba957c23899a553325c3526b63b5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b5f01f861403ba957c23899a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Feb 6 17:03:59 2018 +0100 msvcr100: Add _ReentrantPPLLock::_Scoped_lock class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 19ef182c81bbc92aba1f73179d77f376af1d8b38) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/concrt140/concrt140.spec | 8 ++++---- dlls/msvcr100/msvcr100.spec | 8 ++++---- dlls/msvcr110/msvcr110.spec | 12 ++++++------ dlls/msvcr120/msvcr120.spec | 12 ++++++------ dlls/msvcr120_app/msvcr120_app.spec | 12 ++++++------ dlls/msvcrt/lock.c | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 61 insertions(+), 26 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b5f01f861403ba957c23…
1
0
0
0
Piotr Caban : msvcr100: Add _ReentrantPPLLock class implementation.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: d37e009db00c86aecf99812acc1a5064adfef6f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d37e009db00c86aecf99812a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 2 16:36:26 2018 +0100 msvcr100: Add _ReentrantPPLLock class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7419eff0c21d912293e74aabbc87958a96e4f4ca) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/concrt140/concrt140.spec | 12 ++++----- dlls/msvcr100/msvcr100.spec | 12 ++++----- dlls/msvcr110/msvcr110.spec | 18 ++++++------- dlls/msvcr120/msvcr120.spec | 18 ++++++------- dlls/msvcr120_app/msvcr120_app.spec | 18 ++++++------- dlls/msvcrt/lock.c | 52 +++++++++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 39 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d37e009db00c86aecf99…
1
0
0
0
← Newer
1
...
98
99
100
101
102
103
104
...
110
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200