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
April
March
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 2018
----- 2025 -----
April 2025
March 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
638 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Fix strcpy implementation so it works on overlapping buffers.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 34099917a257906ed52921adf59f4ad83d41a2aa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34099917a257906ed52921ad…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Aug 5 18:23:13 2017 +0200 msvcrt: Fix strcpy implementation so it works on overlapping buffers. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 395a65bdc6c576a084c8008e42c95b9750421e86) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 10 ++++++++++ dlls/msvcrt/tests/string.c | 15 +++++++++++++-- dlls/ucrtbase/ucrtbase.spec | 2 +- 11 files changed, 32 insertions(+), 11 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index d80522a..76f88e6 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1800,7 +1800,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index adefdf1..416d43b 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -2158,7 +2158,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 47f87df..aec2eb6 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2368,7 +2368,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index f2aea27..093d853 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -813,7 +813,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror @ cdecl strftime(str long str ptr) MSVCRT_strftime diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 06c4d32..84367f8 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -809,7 +809,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror @ cdecl strftime(str long str ptr) MSVCRT_strftime diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index b606cc3..0aec6e8 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1480,7 +1480,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 251bff9..d2e4fc5 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1453,7 +1453,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index daf80a0..a5579a2 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1421,7 +1421,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 3e765d0..8d6b48c 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -697,6 +697,16 @@ char* __cdecl MSVCRT_strncpy(char *dst, const char *src, MSVCRT_size_t len) } /********************************************************************* + * strcpy (MSVCRT.@) + */ +char* CDECL MSVCRT_strcpy(char *dst, const char *src) +{ + char *ret = dst; + while ((*dst++ = *src++)); + return ret; +} + +/********************************************************************* * strcpy_s (MSVCRT.@) */ int CDECL MSVCRT_strcpy_s( char* dst, MSVCRT_size_t elem, const char* src ) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 7557996..52d7c66 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -56,6 +56,7 @@ static void* (__cdecl *pmemcpy)(void *, const void *, size_t n); static int (__cdecl *p_memcpy_s)(void *, size_t, const void *, size_t); static int (__cdecl *p_memmove_s)(void *, size_t, const void *, size_t); static int* (__cdecl *pmemcmp)(void *, const void *, size_t n); +static int (__cdecl *p_strcpy)(char *dst, const char *src); static int (__cdecl *pstrcpy_s)(char *dst, size_t len, const char *src); static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src); static int (__cdecl *p_mbscat_s)(unsigned char *dst, size_t size, const unsigned char *src); @@ -493,8 +494,8 @@ static void test_strdup(void) static void test_strcpy_s(void) { char dest[8]; - const char *small = "small"; - const char *big = "atoolongstringforthislittledestination"; + const char small[] = "small"; + const char big[] = "atoolongstringforthislittledestination"; int ret; if(!pstrcpy_s) @@ -543,6 +544,15 @@ static void test_strcpy_s(void) ret = pstrcpy_s(NULL, sizeof(dest), small); ok(ret == EINVAL, "Copying a big string a NULL dest returned %d, expected EINVAL\n", ret); + + /* strcpy overlapping buffers test */ + memset(dest, 'X', sizeof(dest)); + memcpy(dest+1, small, sizeof(small)); + p_strcpy(dest, dest+1); + ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == 'l' && + dest[4] == 'l' && dest[5] == '\0' && dest[6] == '\0' && dest[7] == 'X', + "Unexpected return data from strcpy: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", + dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); } #define NUMELMS(array) (sizeof(array)/sizeof((array)[0])) @@ -3186,6 +3196,7 @@ START_TEST(string) SET(pmemcmp,"memcmp"); SET(p_mbctype,"_mbctype"); SET(p__mb_cur_max,"__mb_cur_max"); + SET(p_strcpy, "strcpy"); pstrcpy_s = (void *)GetProcAddress( hMsvcrt,"strcpy_s" ); pstrcat_s = (void *)GetProcAddress( hMsvcrt,"strcat_s" ); p_mbscat_s = (void*)GetProcAddress( hMsvcrt, "_mbscat_s" ); diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index f6daec0..440f2d8 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2499,7 +2499,7 @@ @ cdecl strchr(str long) MSVCRT_strchr @ cdecl strcmp(str str) MSVCRT_strcmp @ cdecl strcoll(str str) MSVCRT_strcoll -@ cdecl strcpy(ptr str) ntdll.strcpy +@ cdecl strcpy(ptr str) MSVCRT_strcpy @ cdecl strcpy_s(ptr long str) MSVCRT_strcpy_s @ cdecl strcspn(str str) ntdll.strcspn @ cdecl strerror(long) MSVCRT_strerror
1
0
0
0
Alexandre Julliard : winex11: If importing an X11 clipboard format fails, try other candidate formats for the target.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: cf4c982d5f00781b51dbcf39dd34a576cafe9f70 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cf4c982d5f00781b51dbcf39…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 25 08:08:13 2017 +0200 winex11: If importing an X11 clipboard format fails, try other candidate formats for the target. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 401ccc73e204522278d1d0426af008a1b89c8bd9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winex11.drv/clipboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 4cb8cb8..4668ce8 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -1082,8 +1082,9 @@ static HANDLE render_format( UINT id ) for (i = 0; i < nb_current_x11_formats; i++) { if (current_x11_formats[i]->id != id) continue; - handle = import_selection( display, import_window, current_selection, current_x11_formats[i] ); - if (handle) SetClipboardData( id, handle ); + if (!(handle = import_selection( display, import_window, + current_selection, current_x11_formats[i] ))) continue; + SetClipboardData( id, handle ); break; } return handle;
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Initialize day field before setting final hit test result (Valgrind).
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 84c984960e8538a08c8cddb0ffe53b7babf82868 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=84c984960e8538a08c8cddb0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 28 00:07:50 2017 +0300 comctl32/monthcal: Initialize day field before setting final hit test result (Valgrind). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 9231452a9c064fa085733befd283025d2133f13b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/monthcal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 4a9a81e..97e0c8c 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1916,6 +1916,7 @@ MONTHCAL_HitTest(const MONTHCAL_INFO *infoPtr, MCHITTESTINFO *lpht) else if(PtInRect(&infoPtr->calendars[calIdx].days, lpht->pt)) { htinfo.iOffset = calIdx; + htinfo.st.wDay = ht_month->wDay; htinfo.st.wYear = ht_month->wYear; htinfo.st.wMonth = ht_month->wMonth; /* previous month only valid for first calendar */
1
0
0
0
Huw Davies : gdi32: Respect the rop mode in SetPixel.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 16ba8ec24db68e8fdc343f0a3da85953f95128e0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16ba8ec24db68e8fdc343f0a…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jul 24 10:47:04 2017 +0100 gdi32: Respect the rop mode in SetPixel. Based on a patch by Tim Worthington. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8e9af9e01635733376962bea58b04f001a90ac66) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/gdi32/dibdrv/graphics.c | 2 +- dlls/gdi32/tests/dib.c | 70 ++++++++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 32 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=16ba8ec24db68e8fdc34…
1
0
0
0
Huw Davies : gdi32: Add a helper to fill rectangles with a given pixel.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: b5565f2a523f3323924d36b91e4d491121cc9515 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b5565f2a523f3323924d36b9…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jul 24 10:47:03 2017 +0100 gdi32: Add a helper to fill rectangles with a given pixel. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 46e6ee48f3cd5a6eeec50db2a8c7db17025c606f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/gdi32/dibdrv/dibdrv.h | 1 + dlls/gdi32/dibdrv/objects.c | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 770e89e..adf16c4 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -257,6 +257,7 @@ extern void add_clipped_bounds( dibdrv_physdev *dev, const RECT *rect, HRGN clip extern int clip_line(const POINT *start, const POINT *end, const RECT *clip, const bres_params *params, POINT *pt1, POINT *pt2) DECLSPEC_HIDDEN; extern void release_cached_font( struct cached_font *font ) DECLSPEC_HIDDEN; +extern BOOL fill_with_pixel( DC *dc, dib_info *dib, DWORD pixel, int num, const RECT *rects, INT rop ) DECLSPEC_HIDDEN; static inline void init_clipped_rects( struct clipped_rects *clip_rects ) { diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index cde20e3..8e55d1a 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1754,6 +1754,20 @@ COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) } /********************************************************************** + * fill_with_pixel + * + * Fill a number of rectangles with a given pixel color and rop mode + */ +BOOL fill_with_pixel( DC *dc, dib_info *dib, DWORD pixel, int num, const RECT *rects, INT rop ) +{ + rop_mask mask; + + calc_rop_masks( rop, pixel, &mask ); + dib->funcs->solid_rects( dib, num, rects, mask.and, mask.xor ); + return TRUE; +} + +/********************************************************************** * solid_brush * * Fill a number of rectangles with the solid brush @@ -1762,12 +1776,9 @@ static BOOL solid_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib, int num, const RECT *rects, INT rop) { DC *dc = get_physdev_dc( &pdev->dev ); - rop_mask brush_color; DWORD color = get_pixel_color( dc, &pdev->dib, brush->colorref, TRUE ); - calc_rop_masks( rop, color, &brush_color ); - dib->funcs->solid_rects( dib, num, rects, brush_color.and, brush_color.xor ); - return TRUE; + return fill_with_pixel( dc, dib, color, num, rects, rop ); } static BOOL alloc_brush_mask_bits( dib_brush *brush )
1
0
0
0
Dmitry Timoshkov : user32: DialogBoxParam should return -1 when dialog control creation fails.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 89d3f104d7949daa68a414c14c159ef53c4210f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=89d3f104d7949daa68a414c1…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 18 19:42:11 2017 +0800 user32: DialogBoxParam should return -1 when dialog control creation fails. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 3d66e753e7eb00495690bf54abc27943a9e089db) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/dialog.c | 14 ++++++++------ dlls/user32/tests/dialog.c | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 8b77ae2..c2aad8d 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -835,11 +835,12 @@ INT_PTR WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name, HRSRC hrsrc; LPCDLGTEMPLATEA ptr; + if (owner && !IsWindow(owner)) return 0; + if (!(hrsrc = FindResourceA( hInst, name, (LPSTR)RT_DIALOG ))) return -1; if (!(ptr = LoadResource(hInst, hrsrc))) return -1; - hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, FALSE, &owner ); - if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); - return 0; + if (!(hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, FALSE, &owner ))) return -1; + return DIALOG_DoDialogBox( hwnd, owner ); } @@ -853,11 +854,12 @@ INT_PTR WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name, HRSRC hrsrc; LPCDLGTEMPLATEW ptr; + if (owner && !IsWindow(owner)) return 0; + if (!(hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG ))) return -1; if (!(ptr = LoadResource(hInst, hrsrc))) return -1; - hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, TRUE, &owner ); - if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); - return 0; + if (!(hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, dlgProc, param, TRUE, &owner ))) return -1; + return DIALOG_DoDialogBox( hwnd, owner ); } diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 45886aa..1970e8f 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1273,7 +1273,6 @@ static void test_DialogBoxParamA(void) SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DIALOG_INVALID_CLASS", 0, DestroyDlgWinProc, 0); -todo_wine ok(ret == -1, "DialogBoxParamA returned %ld, expected -1\n", ret); ok(GetLastError() == 0, "got %d\n", GetLastError());
1
0
0
0
Dmitry Timoshkov : user32/tests: Test DialogBoxParam using a dialog template with invalid control class.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 3a12abebaa5b734910f5255e1642ffab3d096b58 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a12abebaa5b734910f5255e…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 18 19:41:57 2017 +0800 user32/tests: Test DialogBoxParam using a dialog template with invalid control class. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a62a8601db26bd8c39e561505876c6c41b8156bf) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/tests/dialog.c | 6 ++++++ dlls/user32/tests/resource.rc | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index a37c678..45886aa 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1272,6 +1272,12 @@ static void test_DialogBoxParamA(void) "got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError()); SetLastError(0xdeadbeef); + ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DIALOG_INVALID_CLASS", 0, DestroyDlgWinProc, 0); +todo_wine + ok(ret == -1, "DialogBoxParamA returned %ld, expected -1\n", ret); + ok(GetLastError() == 0, "got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); ret = DefDlgProcA(0, WM_ERASEBKGND, 0, 0); ok(ret == 0, "DefDlgProcA returned %ld, expected 0\n", ret); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc index f116b85..756e38f 100644 --- a/dlls/user32/tests/resource.rc +++ b/dlls/user32/tests/resource.rc @@ -124,6 +124,12 @@ FONT 8, "MS Shell Dlg" EDITTEXT 200,4,4,50,14 } +TEST_DIALOG_INVALID_CLASS DIALOG 0, 0, 60, 30 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +{ + CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10 +} + IDD_DIALOG DIALOG 0, 0, 186, 95 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog"
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Make sure set today date is valid before using it (Valgrind).
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 3097566cde988635d04ceafb048569ee0bfc62cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3097566cde988635d04ceafb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 28 00:07:51 2017 +0300 comctl32/monthcal: Make sure set today date is valid before using it (Valgrind). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a56f49cdd5a3ec14d9c0c5e755f7e3edc4f0835b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/monthcal.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 6a10860..4a9a81e 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -257,10 +257,12 @@ static inline BOOL MONTHCAL_IsDateEqual(const SYSTEMTIME *first, const SYSTEMTIM /* make sure that date fields are valid */ static BOOL MONTHCAL_ValidateDate(const SYSTEMTIME *time) { - if(time->wMonth < 1 || time->wMonth > 12 ) return FALSE; - if(time->wDay > MONTHCAL_MonthLength(time->wMonth, time->wYear)) return FALSE; + if (time->wMonth < 1 || time->wMonth > 12 ) + return FALSE; + if (time->wDay == 0 || time->wDay > MONTHCAL_MonthLength(time->wMonth, time->wYear)) + return FALSE; - return TRUE; + return TRUE; } /* Copies timestamp part only. @@ -1738,21 +1740,28 @@ MONTHCAL_GetToday(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *today) static BOOL MONTHCAL_UpdateToday(MONTHCAL_INFO *infoPtr, const SYSTEMTIME *today) { - RECT new_r, old_r; + RECT rect; + + if (MONTHCAL_IsDateEqual(today, &infoPtr->todaysDate)) + return FALSE; - if(MONTHCAL_IsDateEqual(today, &infoPtr->todaysDate)) return FALSE; + /* Invalidate old and new today day rectangle, and today label. */ + if (MONTHCAL_ValidateDate(&infoPtr->todaysDate)) + { + MONTHCAL_GetDayRect(infoPtr, &infoPtr->todaysDate, &rect, -1); + InvalidateRect(infoPtr->hwndSelf, &rect, FALSE); + } - MONTHCAL_GetDayRect(infoPtr, &infoPtr->todaysDate, &old_r, -1); - MONTHCAL_GetDayRect(infoPtr, today, &new_r, -1); + if (MONTHCAL_ValidateDate(today)) + { + MONTHCAL_GetDayRect(infoPtr, today, &rect, -1); + InvalidateRect(infoPtr->hwndSelf, &rect, FALSE); + } - infoPtr->todaysDate = *today; + infoPtr->todaysDate = *today; - /* only two days need redrawing */ - InvalidateRect(infoPtr->hwndSelf, &old_r, FALSE); - InvalidateRect(infoPtr->hwndSelf, &new_r, FALSE); - /* and today label */ - InvalidateRect(infoPtr->hwndSelf, &infoPtr->todayrect, FALSE); - return TRUE; + InvalidateRect(infoPtr->hwndSelf, &infoPtr->todayrect, FALSE); + return TRUE; } /* MCM_SETTODAT handler */
1
0
0
0
Anton Romanov : windowscodecs: PNGEncoder: Return 32bppRGBA pixel format by default.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: 36bb9a572f6dff807d728cf09f706fcc76cb21d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=36bb9a572f6dff807d728cf0…
Author: Anton Romanov <theli.ua(a)gmail.com> Date: Sun Aug 20 23:40:50 2017 -0700 windowscodecs: PNGEncoder: Return 32bppRGBA pixel format by default. Signed-off-by: Anton Romanov <theli.ua(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 267bca1f3b17ee22ba24972ad10757d997d01a20) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/windowscodecs/pngformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 2e3a42b..cbdd98b 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -1327,6 +1327,7 @@ struct png_pixelformat { }; static const struct png_pixelformat formats[] = { + {&GUID_WICPixelFormat32bppBGRA, 32, 8, PNG_COLOR_TYPE_RGB_ALPHA, 0, 1}, {&GUID_WICPixelFormat24bppBGR, 24, 8, PNG_COLOR_TYPE_RGB, 0, 1}, {&GUID_WICPixelFormatBlackWhite, 1, 1, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat2bppGray, 2, 2, PNG_COLOR_TYPE_GRAY, 0, 0}, @@ -1334,7 +1335,6 @@ static const struct png_pixelformat formats[] = { {&GUID_WICPixelFormat8bppGray, 8, 8, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat16bppGray, 16, 16, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat32bppBGR, 32, 8, PNG_COLOR_TYPE_RGB, 1, 1}, - {&GUID_WICPixelFormat32bppBGRA, 32, 8, PNG_COLOR_TYPE_RGB_ALPHA, 0, 1}, {&GUID_WICPixelFormat48bppRGB, 48, 16, PNG_COLOR_TYPE_RGB, 0, 0}, {&GUID_WICPixelFormat64bppRGBA, 64, 16, PNG_COLOR_TYPE_RGB_ALPHA, 0, 0}, {NULL},
1
0
0
0
Akihiro Sagawa : msvcrt: Fix mbstowcs with empty strings.
by Alexandre Julliard
02 Jan '18
02 Jan '18
Module: wine Branch: stable Commit: ed6635099832d35c7423db88361173bf1f80a368 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed6635099832d35c7423db88…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri Aug 4 23:06:39 2017 +0900 msvcrt: Fix mbstowcs with empty strings. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 967fb744e4af99b61e6af9a7c2ddde4640b54ebf) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/mbcs.c | 14 ++++++++------ dlls/msvcrt/tests/string.c | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index aabbf7a..63be805 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2278,12 +2278,14 @@ MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(MSVCRT_wchar_t *wcstr, const char *mbstr, size += (MSVCRT__isleadbyte_l((unsigned char)mbstr[size], locale) ? 2 : 1); } - size = MultiByteToWideChar(locinfo->lc_codepage, 0, - mbstr, size, wcstr, count); - if(!size) { - if(count) wcstr[0] = '\0'; - *MSVCRT__errno() = MSVCRT_EILSEQ; - return -1; + if(size) { + size = MultiByteToWideChar(locinfo->lc_codepage, 0, + mbstr, size, wcstr, count); + if(!size) { + if(count) wcstr[0] = '\0'; + *MSVCRT__errno() = MSVCRT_EILSEQ; + return -1; + } } if(size<count && wcstr) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 58e19a9..7557996 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -1900,7 +1900,7 @@ static void test_mbstowcs(void) ok(!memcmp(wOut, wHiragana, sizeof(wHiragana)), "wOut = %s\n", wine_dbgstr_w(wOut)); ret = mbstowcs(wOut, mEmpty, 6); - todo_wine ok(ret == 0, "mbstowcs did not return 0, got %d\n", (int)ret); + ok(ret == 0, "mbstowcs did not return 0, got %d\n", (int)ret); ok(!memcmp(wOut, wEmpty, sizeof(wEmpty)), "wOut = %s\n", wine_dbgstr_w(wOut)); ret = wcstombs(mOut, wHiragana, 6); @@ -1928,8 +1928,8 @@ static void test_mbstowcs(void) ok(!memcmp(wOut, wHiragana, sizeof(wHiragana)), "wOut = %s\n", wine_dbgstr_w(wOut)); err = pmbstowcs_s(&ret, wOut, 6, mEmpty, _TRUNCATE); - todo_wine ok(err == 0, "err = %d\n", err); - todo_wine ok(ret == 1, "mbstowcs_s did not return 1, got %d\n", (int)ret); + ok(err == 0, "err = %d\n", err); + ok(ret == 1, "mbstowcs_s did not return 1, got %d\n", (int)ret); ok(!memcmp(wOut, wEmpty, sizeof(wEmpty)), "wOut = %s\n", wine_dbgstr_w(wOut)); err = pmbstowcs_s(&ret, NULL, 0, mHiragana, 1);
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
64
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
Results per page:
10
25
50
100
200