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
September 2017
----- 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
446 discussions
Start a n
N
ew thread
Anton Romanov : secur32: Protect SSLRead/Write with cs on OSX.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 1dbf6c8f54c17e50852470caf88febb816aad4fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dbf6c8f54c17e50852470caf…
Author: Anton Romanov <theli.ua(a)gmail.com> Date: Fri Sep 15 22:40:03 2017 -0700 secur32: Protect SSLRead/Write with cs on OSX. Signed-off-by: Anton Romanov <theli.ua(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/schannel_macosx.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/secur32/schannel_macosx.c b/dlls/secur32/schannel_macosx.c index 7f38133..015de92 100644 --- a/dlls/secur32/schannel_macosx.c +++ b/dlls/secur32/schannel_macosx.c @@ -185,6 +185,7 @@ enum { struct mac_session { SSLContextRef context; struct schan_transport *transport; + CRITICAL_SECTION cs; }; @@ -742,6 +743,9 @@ BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cre if (!s) return FALSE; + InitializeCriticalSection(&s->cs); + s->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": mac_session.cs"); + status = SSLNewContext(cred->credential_use == SECPKG_CRED_INBOUND, &s->context); if (status != noErr) { @@ -803,6 +807,7 @@ void schan_imp_dispose_session(schan_imp_session session) status = SSLDisposeContext(s->context); if (status != noErr) ERR("Failed to dispose of session context: %d\n", status); + DeleteCriticalSection(&s->cs); HeapFree(GetProcessHeap(), 0, s); } @@ -1090,7 +1095,9 @@ SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer, TRACE("(%p/%p, %p, %p/%lu)\n", s, s->context, buffer, length, *length); + EnterCriticalSection(&s->cs); status = SSLWrite(s->context, buffer, *length, length); + LeaveCriticalSection(&s->cs); if (status == noErr) TRACE("Wrote %lu bytes\n", *length); else if (status == errSSLWouldBlock) @@ -1120,7 +1127,9 @@ SECURITY_STATUS schan_imp_recv(schan_imp_session session, void *buffer, TRACE("(%p/%p, %p, %p/%lu)\n", s, s->context, buffer, length, *length); + EnterCriticalSection(&s->cs); status = SSLRead(s->context, buffer, *length, length); + LeaveCriticalSection(&s->cs); if (status == noErr || status == errSSLClosedGraceful) TRACE("Read %lu bytes\n", *length); else if (status == errSSLWouldBlock)
1
0
0
0
Anton Romanov : secur32: Fix race between schan_(Encrypt|Decrypt)Message.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 3c40ffbfad793af11225cbb55f08b88278a9816a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c40ffbfad793af11225cbb55…
Author: Anton Romanov <theli.ua(a)gmail.com> Date: Fri Sep 15 22:40:02 2017 -0700 secur32: Fix race between schan_(Encrypt|Decrypt)Message. Signed-off-by: Anton Romanov <theli.ua(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/schannel.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 82374ef..88b6521 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -57,6 +57,7 @@ struct schan_handle struct schan_context { schan_imp_session session; + struct schan_transport transport; ULONG req_ctx_attr; const CERT_CONTEXT *cert; }; @@ -789,7 +790,6 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( struct schan_context *ctx; struct schan_buffers *out_buffers; struct schan_credentials *cred; - struct schan_transport transport; SIZE_T expected_size = ~0UL; SECURITY_STATUS ret; @@ -833,6 +833,9 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( return SEC_E_INTERNAL_ERROR; } + ctx->transport.ctx = ctx; + schan_imp_set_session_transport(ctx->session, &ctx->transport); + if (pszTargetName && *pszTargetName) { UINT len = WideCharToMultiByte( CP_UNIXCP, 0, pszTargetName, -1, NULL, 0, NULL, NULL ); @@ -891,24 +894,22 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( ctx->req_ctx_attr = fContextReq; - transport.ctx = ctx; - init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_input_buffer); - transport.in.limit = expected_size; - init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_output_buffer); - schan_imp_set_session_transport(ctx->session, &transport); + init_schan_buffers(&ctx->transport.in, pInput, schan_init_sec_ctx_get_next_input_buffer); + ctx->transport.in.limit = expected_size; + init_schan_buffers(&ctx->transport.out, pOutput, schan_init_sec_ctx_get_next_output_buffer); /* Perform the TLS handshake */ ret = schan_imp_handshake(ctx->session); - if(transport.in.offset && transport.in.offset != pInput->pBuffers[0].cbBuffer) { + if(ctx->transport.in.offset && ctx->transport.in.offset != pInput->pBuffers[0].cbBuffer) { if(pInput->cBuffers<2 || pInput->pBuffers[1].BufferType!=SECBUFFER_EMPTY) return SEC_E_INVALID_TOKEN; pInput->pBuffers[1].BufferType = SECBUFFER_EXTRA; - pInput->pBuffers[1].cbBuffer = pInput->pBuffers[0].cbBuffer-transport.in.offset; + pInput->pBuffers[1].cbBuffer = pInput->pBuffers[0].cbBuffer-ctx->transport.in.offset; } - out_buffers = &transport.out; + out_buffers = &ctx->transport.out; if (out_buffers->current_buffer_idx != -1) { SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx]; @@ -1205,7 +1206,6 @@ static int schan_encrypt_message_get_next_buffer_token(const struct schan_transp static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle, ULONG quality, PSecBufferDesc message, ULONG message_seq_no) { - struct schan_transport transport; struct schan_context *ctx; struct schan_buffers *b; SECURITY_STATUS status; @@ -1235,13 +1235,10 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle data = HeapAlloc(GetProcessHeap(), 0, data_size); memcpy(data, buffer->pvBuffer, data_size); - transport.ctx = ctx; - init_schan_buffers(&transport.in, NULL, NULL); if (schan_find_sec_buffer_idx(message, 0, SECBUFFER_STREAM_HEADER) != -1) - init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer); + init_schan_buffers(&ctx->transport.out, message, schan_encrypt_message_get_next_buffer); else - init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer_token); - schan_imp_set_session_transport(ctx->session, &transport); + init_schan_buffers(&ctx->transport.out, message, schan_encrypt_message_get_next_buffer_token); length = data_size; status = schan_imp_send(ctx->session, data, &length); @@ -1251,7 +1248,7 @@ static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle if (length != data_size) status = SEC_E_INTERNAL_ERROR; - b = &transport.out; + b = &ctx->transport.out; b->desc->pBuffers[b->current_buffer_idx].cbBuffer = b->offset; HeapFree(GetProcessHeap(), 0, data); @@ -1327,7 +1324,6 @@ static void schan_decrypt_fill_buffer(PSecBufferDesc message, ULONG buffer_type, static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle, PSecBufferDesc message, ULONG message_seq_no, PULONG quality) { - struct schan_transport transport; struct schan_context *ctx; SecBuffer *buffer; SIZE_T data_size; @@ -1371,11 +1367,8 @@ static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle data_size = expected_size - 5; data = HeapAlloc(GetProcessHeap(), 0, data_size); - transport.ctx = ctx; - init_schan_buffers(&transport.in, message, schan_decrypt_message_get_next_buffer); - transport.in.limit = expected_size; - init_schan_buffers(&transport.out, NULL, NULL); - schan_imp_set_session_transport(ctx->session, &transport); + init_schan_buffers(&ctx->transport.in, message, schan_decrypt_message_get_next_buffer); + ctx->transport.in.limit = expected_size; while (received < data_size) {
1
0
0
0
Alex Henrie : msvcrt: Set the correct error number in pow(f).
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 3864851feb1a8a76a8665dea0484512f1fc13c8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3864851feb1a8a76a8665dea0…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Sep 14 09:16:57 2017 -0600 msvcrt: Set the correct error number in pow(f). Old versions of MSVC set EDOM on pow(-1, INFINITY) and pow(-1, -INFINITY) but new versions do not. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 12 ++++++++---- dlls/ucrtbase/tests/misc.c | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 05a2b72..60ce4e6 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -318,9 +318,11 @@ float CDECL MSVCRT_log10f( float x ) */ float CDECL MSVCRT_powf( float x, float y ) { - /* FIXME: If x < 0 and y is not integral, set EDOM */ float z = powf(x,y); - if (!finitef(z)) math_error(_DOMAIN, "powf", x, 0, z); + if (x < 0 && y != floorf(y)) math_error(_DOMAIN, "powf", x, y, z); + else if (!x && finitef(y) && y < 0) math_error(_SING, "powf", x, y, z); + else if (finitef(x) && finitef(y) && !finitef(z)) math_error(_OVERFLOW, "powf", x, y, z); + else if (x && finitef(x) && finitef(y) && !z) math_error(_UNDERFLOW, "powf", x, y, z); return z; } @@ -530,9 +532,11 @@ double CDECL MSVCRT_log10( double x ) */ double CDECL MSVCRT_pow( double x, double y ) { - /* FIXME: If x < 0 and y is not integral, set EDOM */ double z = pow(x,y); - if (!isfinite(z)) math_error(_DOMAIN, "pow", x, y, z); + if (x < 0 && y != floor(y)) math_error(_DOMAIN, "pow", x, y, z); + else if (!x && isfinite(y) && y < 0) math_error(_SING, "pow", x, y, z); + else if (isfinite(x) && isfinite(y) && !isfinite(z)) math_error(_OVERFLOW, "pow", x, y, z); + else if (x && isfinite(x) && isfinite(y) && !z) math_error(_UNDERFLOW, "pow", x, y, z); return z; } diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c index 04718c9..d17f2d0 100644 --- a/dlls/ucrtbase/tests/misc.c +++ b/dlls/ucrtbase/tests/misc.c @@ -647,6 +647,29 @@ static void test_math_errors(void) {"atan2", INFINITY, 0, -1, -1}, {"atan2", 0, -INFINITY, -1, -1}, {"atan2", 0, INFINITY, -1, -1}, + {"pow", -INFINITY, -2, -1, -1}, + {"pow", -INFINITY, -1, -1, -1}, + {"pow", -INFINITY, 0, -1, -1}, + {"pow", -INFINITY, 1, -1, -1}, + {"pow", -INFINITY, 2, -1, -1}, + {"pow", -1e100, -10, -1, _UNDERFLOW}, + {"pow", -1e100, 10, ERANGE, _OVERFLOW}, + {"pow", -1, 1.5, EDOM, _DOMAIN}, + {"pow", 0, -2, ERANGE, _SING}, + {"pow", 0, -1, ERANGE, _SING}, + {"pow", 0.5, -INFINITY, -1, -1}, + {"pow", 0.5, INFINITY, -1, -1}, + {"pow", 2, -INFINITY, -1, -1}, + {"pow", 2, -1e100, -1, _UNDERFLOW}, + {"pow", 2, 1e100, ERANGE, _OVERFLOW}, + {"pow", 2, INFINITY, -1, -1}, + {"pow", 1e100, -10, -1, _UNDERFLOW}, + {"pow", 1e100, 10, ERANGE, _OVERFLOW}, + {"pow", INFINITY, -2, -1, -1}, + {"pow", INFINITY, -1, -1, -1}, + {"pow", INFINITY, 0, -1, -1}, + {"pow", INFINITY, 1, -1, -1}, + {"pow", INFINITY, 2, -1, -1}, }; const struct { char func[16];
1
0
0
0
Hugh Bellamy : gdiplus: Define GpHatchStyle.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: c022c46613c137ab53185b5e7752aff14a085c4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c022c46613c137ab53185b5e7…
Author: Hugh Bellamy <hughbellars(a)gmail.com> Date: Fri Sep 15 16:39:59 2017 +0100 gdiplus: Define GpHatchStyle. Signed-off-by: Hugh Bellamy <hughbellars(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/brush.c | 6 +++--- dlls/gdiplus/gdiplus_private.h | 4 ++-- dlls/gdiplus/tests/brush.c | 22 ++++++++++++++++++++++ include/gdiplusflat.h | 4 ++-- include/gdiplusgpstubs.h | 1 + 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 6db4ada..d5cd94a 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -230,7 +230,7 @@ static const char HatchBrushes[][8] = { { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff }, /* HatchStyleDarkHorizontal */ }; -GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) +GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result) { if (hatchstyle < sizeof(HatchBrushes) / sizeof(HatchBrushes[0])) { @@ -244,7 +244,7 @@ GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) /****************************************************************************** * GdipCreateHatchBrush [GDIPLUS.@] */ -GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle hatchstyle, ARGB forecol, ARGB backcol, GpHatch **brush) +GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol, ARGB backcol, GpHatch **brush) { TRACE("(%d, %d, %d, %p)\n", hatchstyle, forecol, backcol, brush); @@ -941,7 +941,7 @@ GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch *brush, ARGB *forecol) return Ok; } -GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch *brush, HatchStyle *hatchstyle) +GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch *brush, GpHatchStyle *hatchstyle) { TRACE("(%p, %p)\n", brush, hatchstyle); diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 6bb7f88..33f6ceb 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -139,7 +139,7 @@ extern GpStatus trace_path(GpGraphics *graphics, GpPath *path) DECLSPEC_HIDDEN; typedef struct region_element region_element; extern void delete_element(region_element *element) DECLSPEC_HIDDEN; -extern GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN; +extern GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result) DECLSPEC_HIDDEN; static inline INT gdip_round(REAL x) { @@ -276,7 +276,7 @@ struct GpBrush{ struct GpHatch{ GpBrush brush; - HatchStyle hatchstyle; + GpHatchStyle hatchstyle; ARGB forecol; ARGB backcol; }; diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index e002a6f..45b2710 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -1556,6 +1556,27 @@ static void test_pathgradientblend(void) expect(Ok, status); } +static void test_getHatchStyle(void) +{ + GpStatus status; + GpHatch *brush; + GpHatchStyle hatchStyle; + + GdipCreateHatchBrush(HatchStyleHorizontal, 11, 12, &brush); + + status = GdipGetHatchStyle(NULL, &hatchStyle); + expect(InvalidParameter, status); + + status = GdipGetHatchStyle(brush, NULL); + expect(InvalidParameter, status); + + status = GdipGetHatchStyle(brush, &hatchStyle); + expect(Ok, status); + expect(HatchStyleHorizontal, hatchStyle); + + GdipDeleteBrush((GpBrush *)brush); +} + START_TEST(brush) { struct GdiplusStartupInput gdiplusStartupInput; @@ -1606,6 +1627,7 @@ START_TEST(brush) test_pathgradientcenterpoint(); test_pathgradientpresetblend(); test_pathgradientblend(); + test_getHatchStyle(); GdiplusShutdown(gdiplusToken); DestroyWindow(hwnd); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index f2ac91e..8bfe8b8 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -387,10 +387,10 @@ GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL, GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL); /* HatchBrush */ -GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle,ARGB,ARGB,GpHatch**); +GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle,ARGB,ARGB,GpHatch**); GpStatus WINGDIPAPI GdipGetHatchBackgroundColor(GpHatch*,ARGB*); GpStatus WINGDIPAPI GdipGetHatchForegroundColor(GpHatch*,ARGB*); -GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,HatchStyle*); +GpStatus WINGDIPAPI GdipGetHatchStyle(GpHatch*,GpHatchStyle*); /* Image */ GpStatus WINGDIPAPI GdipCloneImage(GpImage*, GpImage**); diff --git a/include/gdiplusgpstubs.h b/include/gdiplusgpstubs.h index 5a65cd8..67b6ac1 100644 --- a/include/gdiplusgpstubs.h +++ b/include/gdiplusgpstubs.h @@ -95,5 +95,6 @@ typedef FlushIntention GpFlushIntention; typedef CoordinateSpace GpCoordinateSpace; typedef PenAlignment GpPenAlignment; typedef PenType GpPenType; +typedef HatchStyle GpHatchStyle; #endif
1
0
0
0
Hugh Bellamy : gdiplus: Fix validation of HatchStyle in GdipCreateHatchBrush.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: e0601829e1093c6ba6e42004f5270817a6d90a3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0601829e1093c6ba6e42004f…
Author: Hugh Bellamy <hughbellars(a)gmail.com> Date: Sun Sep 17 11:46:56 2017 +0100 gdiplus: Fix validation of HatchStyle in GdipCreateHatchBrush. Signed-off-by: Hugh Bellamy <hughbellars(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/brush.c | 3 +++ dlls/gdiplus/tests/brush.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 201fadf..6db4ada 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -250,6 +250,9 @@ GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle hatchstyle, ARGB forecol, AR if(!brush) return InvalidParameter; + if(hatchstyle < HatchStyleMin || hatchstyle > HatchStyleMax) + return InvalidParameter; + *brush = heap_alloc_zero(sizeof(GpHatch)); if (!*brush) return OutOfMemory; diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index 045d5e5..e002a6f 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -45,6 +45,33 @@ static void test_constructor_destructor(void) expect(Ok, status); } +static void test_createHatchBrush(void) +{ + GpStatus status; + GpHatch *brush; + + status = GdipCreateHatchBrush(HatchStyleMin, 1, 2, &brush); + expect(Ok, status); + ok(brush != NULL, "Expected the brush to be initialized."); + + GdipDeleteBrush((GpBrush *)brush); + + status = GdipCreateHatchBrush(HatchStyleMax, 1, 2, &brush); + expect(Ok, status); + ok(brush != NULL, "Expected the brush to be initialized."); + + GdipDeleteBrush((GpBrush *)brush); + + status = GdipCreateHatchBrush(HatchStyle05Percent, 1, 2, NULL); + expect(InvalidParameter, status); + + status = GdipCreateHatchBrush((HatchStyle)(HatchStyleMin - 1), 1, 2, &brush); + expect(InvalidParameter, status); + + status = GdipCreateHatchBrush((HatchStyle)(HatchStyleMax + 1), 1, 2, &brush); + expect(InvalidParameter, status); +} + static void test_type(void) { GpStatus status; @@ -1563,6 +1590,7 @@ START_TEST(brush) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); test_constructor_destructor(); + test_createHatchBrush(); test_type(); test_gradientblendcount(); test_getblend();
1
0
0
0
Nikolay Sivov : gdiplus: Implement playback for EmfPlusRecordTypeSetInterpolationMode.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 071d7c3fbe91b813dad06f8d77e9ebd6699a5be5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=071d7c3fbe91b813dad06f8d7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 18 10:42:46 2017 +0300 gdiplus: Implement playback for EmfPlusRecordTypeSetInterpolationMode. 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> --- dlls/gdiplus/metafile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index fbaee28..d135e36 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1840,6 +1840,10 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, { return GdipSetCompositingQuality(real_metafile->playback_graphics, (flags >> 8) & 0xf); } + case EmfPlusRecordTypeSetInterpolationMode: + { + return GdipSetInterpolationMode(real_metafile->playback_graphics, (flags >> 8) & 0xf); + } default: FIXME("Not implemented for record type %x\n", recordType); return NotImplemented;
1
0
0
0
Nikolay Sivov : gdiplus: Implement playback for EmfPlusRecordTypeSetCompositingQuality.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 024750b182929847a316c0810e33df50281d5966 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=024750b182929847a316c0810…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 18 10:42:45 2017 +0300 gdiplus: Implement playback for EmfPlusRecordTypeSetCompositingQuality. 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> --- dlls/gdiplus/metafile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index e8e35d3..fbaee28 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1836,6 +1836,10 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, { return GdipSetPixelOffsetMode(real_metafile->playback_graphics, (flags >> 8) & 0xf); } + case EmfPlusRecordTypeSetCompositingQuality: + { + return GdipSetCompositingQuality(real_metafile->playback_graphics, (flags >> 8) & 0xf); + } default: FIXME("Not implemented for record type %x\n", recordType); return NotImplemented;
1
0
0
0
Nikolay Sivov : gdiplus: Implement playback for EmfPlusRecordTypeSetPixelOffsetMode.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 10a80b8c1b7ed2945d701796cec3c1a4782c2702 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10a80b8c1b7ed2945d701796c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 18 10:42:44 2017 +0300 gdiplus: Implement playback for EmfPlusRecordTypeSetPixelOffsetMode. 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> --- dlls/gdiplus/metafile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 6260cb3..e8e35d3 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1832,6 +1832,10 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, break; } + case EmfPlusRecordTypeSetPixelOffsetMode: + { + return GdipSetPixelOffsetMode(real_metafile->playback_graphics, (flags >> 8) & 0xf); + } default: FIXME("Not implemented for record type %x\n", recordType); return NotImplemented;
1
0
0
0
Alexandre Julliard : kernel32/tests: Add tests for the register values at process start.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: 985cf6731cc55a42c3a5ef9ec903e207dbd4a80f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=985cf6731cc55a42c3a5ef9ec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 18 15:45:10 2017 +0200 kernel32/tests: Add tests for the register values at process start. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/process.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index ca51a41..e7fe35c 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -3020,6 +3020,8 @@ static void test_SuspendProcessState(void) BOOL pipe_connected; ULONG pipe_magic, numb; BOOL ret; + void *entry_ptr, *peb_ptr; + PEB child_peb; exit_process_ptr = GetProcAddress(hkernel32, "ExitProcess"); ok(exit_process_ptr != NULL, "GetProcAddress ExitProcess failed\n"); @@ -3103,6 +3105,19 @@ static void test_SuspendProcessState(void) ok(ret, "Failed to write to remote process memory (%d)\n", GetLastError()); #ifdef __x86_64__ + ok( ctx.ContextFlags == CONTEXT_FULL, "wrong flags %x\n", ctx.ContextFlags ); + ok( !ctx.Rax, "rax is not zero %lx\n", ctx.Rax ); + todo_wine + { + ok( !ctx.Rbx, "rbx is not zero %lx\n", ctx.Rbx ); + ok( !ctx.Rsi, "rsi is not zero %lx\n", ctx.Rsi ); + ok( !ctx.Rdi, "rdi is not zero %lx\n", ctx.Rdi ); + ok( !ctx.Rbp, "rbp is not zero %lx\n", ctx.Rbp ); + ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %lx\n", ctx.Rsp ); + } + entry_ptr = (void *)ctx.Rcx; + peb_ptr = (void *)ctx.Rdx; + rop_chain.exit_process_ptr = exit_process_ptr; ctx.Rcx = (ULONG_PTR)remote_pipe_params + offsetof(struct pipe_params, pipe_name); ctx.Rdx = (ULONG_PTR)remote_pipe_params + offsetof(struct pipe_params, pipe_write_buf); @@ -3117,6 +3132,20 @@ static void test_SuspendProcessState(void) ret = WriteProcessMemory(pi.hProcess, (void *)ctx.Rsp, &rop_chain, sizeof(rop_chain), NULL); ok(ret, "Failed to write to remote process thread stack (%d)\n", GetLastError()); #else + ok( ctx.ContextFlags == CONTEXT_FULL, "wrong flags %x\n", ctx.ContextFlags ); + todo_wine + ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08x\n", ctx.Ebp ); + if (!ctx.Ebp) /* winxp is completely different */ + { + ok( !ctx.Ecx, "ecx is not zero %08x\n", ctx.Ecx ); + ok( !ctx.Edx, "edx is not zero %08x\n", ctx.Edx ); + ok( !ctx.Esi, "esi is not zero %08x\n", ctx.Esi ); + ok( !ctx.Edi, "edi is not zero %08x\n", ctx.Edi ); + ok( !((ctx.Esp + 0x10) & 0xfff), "esp is not at top of stack page %08x\n", ctx.Esp ); + } + entry_ptr = (void *)ctx.Eax; + peb_ptr = (void *)ctx.Ebx; + rop_chain.exit_process_ptr = exit_process_ptr; rop_chain.pipe_name = (ULONG_PTR)remote_pipe_params + offsetof(struct pipe_params, pipe_name); rop_chain.pipe_write_buf = (ULONG_PTR)remote_pipe_params + offsetof(struct pipe_params, pipe_write_buf); @@ -3132,6 +3161,18 @@ static void test_SuspendProcessState(void) ret = WriteProcessMemory(pi.hProcess, (void *)ctx.Esp, &rop_chain, sizeof(rop_chain), NULL); ok(ret, "Failed to write to remote process thread stack (%d)\n", GetLastError()); #endif + + ret = ReadProcessMemory( pi.hProcess, peb_ptr, &child_peb, sizeof(child_peb), NULL ); + todo_wine + ok( ret, "Failed to read PEB (%u)\n", GetLastError() ); + if (ret) + ok( child_peb.ImageBaseAddress == exe_base, "wrong base %p/%p\n", + child_peb.ImageBaseAddress, exe_base ); + todo_wine + ok( entry_ptr == (char *)exe_base + nt_header.OptionalHeader.AddressOfEntryPoint, + "wrong entry point %p/%p\n", entry_ptr, + (char *)exe_base + nt_header.OptionalHeader.AddressOfEntryPoint ); + ret = SetThreadContext(pi.hThread, &ctx); ok(ret, "Failed to set remote thread context (%d)\n", GetLastError());
1
0
0
0
Alexandre Julliard : server: Don' t return debug registers unless explicitly requested.
by Alexandre Julliard
18 Sep '17
18 Sep '17
Module: wine Branch: master Commit: cb7f04ce6f9bbd4d0d951ca19e924b912e29b9ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb7f04ce6f9bbd4d0d951ca19…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 18 15:50:16 2017 +0200 server: Don't return debug registers unless explicitly requested. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/thread.c b/server/thread.c index 903420b..2c864a6 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1653,7 +1653,7 @@ DECL_HANDLER(get_thread_context) memset( context, 0, sizeof(context_t) ); context->cpu = thread->process->cpu; if (thread->context) copy_context( context, thread->context, req->flags & ~flags ); - if (flags) get_thread_context( thread, context, flags ); + if (req->flags & flags) get_thread_context( thread, context, req->flags & flags ); } release_object( thread ); }
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
45
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
Results per page:
10
25
50
100
200