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
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
September 2009
----- 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
3 participants
866 discussions
Start a n
N
ew thread
Henri Verbeet : d3d10: Use the shader variable class/ type debug functions in parse_fx10_type().
by Alexandre Julliard
11 Sep '09
11 Sep '09
Module: wine Branch: master Commit: b0c462080289ac4d064a788bfe2876011709b24b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0c462080289ac4d064a788bf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Sep 10 16:57:14 2009 +0200 d3d10: Use the shader variable class/type debug functions in parse_fx10_type(). This got lost by 7c156c5753f57535b9c12ea3cb8ac17562b4f214. --- dlls/d3d10/effect.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 3ac6875..c80cf56 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -344,8 +344,8 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con TRACE("Type description: %#x.\n", tmp); TRACE("\tcolumns: %u.\n", t->column_count); TRACE("\trows: %u.\n", t->row_count); - TRACE("\tbasetype: %#x.\n", t->basetype); - TRACE("\tclass: %#x.\n", t->type_class); + TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype)); + TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class)); TRACE("\tunknown bits: %#x.\n", tmp & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK | D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK)); }
1
0
0
0
Ge van Geldorp : winhttp/tests: Fix tests on Win7.
by Alexandre Julliard
11 Sep '09
11 Sep '09
Module: wine Branch: master Commit: 40446600dc8a92b06284a4e7d87e11b5ed7c4507 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40446600dc8a92b06284a4e7d…
Author: Ge van Geldorp <ggeldorp(a)vmware.com> Date: Thu Sep 10 13:48:45 2009 +0200 winhttp/tests: Fix tests on Win7. --- dlls/winhttp/tests/winhttp.c | 44 ++++++++++++++++++++++++++--------------- 1 files changed, 28 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=40446600dc8a92b06284a…
1
0
0
0
Vladimir Pankratov : jscript: Update Russian translation.
by Alexandre Julliard
11 Sep '09
11 Sep '09
Module: wine Branch: master Commit: 7529008c700357d3f4d44135a352586a2130a4ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7529008c700357d3f4d44135a…
Author: Vladimir Pankratov <scriptkid(a)mail.ru> Date: Thu Sep 10 21:05:55 2009 +0500 jscript: Update Russian translation. --- dlls/jscript/jscript_Ru.rc | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/jscript_Ru.rc b/dlls/jscript/jscript_Ru.rc index 998c715..a2bf3ce 100644 --- a/dlls/jscript/jscript_Ru.rc +++ b/dlls/jscript/jscript_Ru.rc @@ -25,9 +25,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE { - IDS_TO_PRIMITIVE "Ошибка конвертирования обьекта в примитивный тип" + IDS_TO_PRIMITIVE "Ошибка конвертирования объекта в примитивный тип" IDS_INVALID_CALL_ARG "Неверный вызов процедуры или аргумент" - IDS_NO_PROPERTY "Обьект не поддерживает это свойство или метод" + IDS_NO_PROPERTY "Объект не поддерживает это свойство или метод" IDS_ARG_NOT_OPT "Отсутствует обязательный аргумент" IDS_SYNTAX_ERROR "Синтаксическая ошибка" IDS_SEMICOLON "Ожидается ';'" @@ -35,10 +35,11 @@ STRINGTABLE DISCARDABLE IDS_RBRACKET "Ожидается ')'" IDS_UNTERMINATED_STR "Незавершённая строковая константа" IDS_NOT_FUNC "Ожидается функция" - IDS_NOT_DATE "'[object]' не обьект типа 'date'" + IDS_NOT_DATE "'[object]' не объект типа 'date'" IDS_NOT_NUM "Ожидается число" + IDS_OBJECT_EXPECTED "Ожидается объект" IDS_ILLEGAL_ASSIGN "Неверное присваивание" IDS_UNDEFINED "'|' не определён" - IDS_NOT_BOOL "Ожидается обьект типа 'bool'" + IDS_NOT_BOOL "Ожидается объект типа 'bool'" IDS_INVALID_LENGTH "Длиной массива должно быть конечное положительное число" }
1
0
0
0
Hans Leidekker : msi: Ignore CoInitialize failure in ACTION_CreateShortcuts .
by Alexandre Julliard
11 Sep '09
11 Sep '09
Module: wine Branch: master Commit: dd1ca6ca5ef0bee4c69b7016d52d6e7a76ff6722 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd1ca6ca5ef0bee4c69b7016d…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Thu Sep 10 10:10:33 2009 +0200 msi: Ignore CoInitialize failure in ACTION_CreateShortcuts. --- dlls/msi/action.c | 8 ++------ dlls/msi/tests/install.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 881c4a2..6bff87a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3387,16 +3387,12 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package) return ERROR_SUCCESS; res = CoInitialize( NULL ); - if (FAILED (res)) - { - ERR("CoInitialize failed\n"); - return ERROR_FUNCTION_FAILED; - } rc = MSI_IterateRecords(view, NULL, ITERATE_CreateShortcuts, package); msiobj_release(&view->hdr); - CoUninitialize(); + if (SUCCEEDED(res)) + CoUninitialize(); return rc; } diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 9d1237a..b78e3dc 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6212,7 +6212,7 @@ static void test_shortcut(void) ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr); r = MsiInstallProductA(msifile, NULL); - todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); CoUninitialize();
1
0
0
0
André Hentschel : winehq: Fix some HTML markup
by Jeremy Newman
10 Sep '09
10 Sep '09
Module: website Branch: master Commit: 1cdaf6bb4e656442c91b40126c47977cce291699 URL:
http://source.winehq.org/git/website.git/?a=commit;h=1cdaf6bb4e656442c91b40…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Sep 9 14:24:07 2009 +0200 winehq: Fix some HTML markup --- templates/de/about.template | 2 +- templates/de/contributing.template | 8 +++--- templates/de/download.template | 10 +++--- templates/de/help.template | 16 ++++++------ templates/en/about.template | 2 +- templates/en/contributing.template | 8 +++--- templates/en/documentation.template | 48 +++++++++++++++++----------------- templates/en/download.template | 10 +++--- templates/en/help.template | 16 ++++++------ templates/fr/about.template | 2 +- templates/pl/about.template | 2 +- templates/pl/download.template | 10 +++--- templates/pl/help.template | 16 ++++++------ templates/pt/about.template | 2 +- templates/pt/contributing.template | 8 +++--- 15 files changed, 80 insertions(+), 80 deletions(-) Diff:
http://source.winehq.org/git/website.git/?a=commitdiff;h=1cdaf6bb4e656442c9…
1
0
0
0
Łukasz Wojniłowicz : Polish translation for release 1.1.29
by Jeremy Newman
10 Sep '09
10 Sep '09
Module: website Branch: master Commit: bac1269333f603cc25e3b59392cf9c4902284f61 URL:
http://source.winehq.org/git/website.git/?a=commit;h=bac1269333f603cc25e3b5…
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> Date: Sun Sep 6 10:27:18 2009 +0200 Polish translation for release 1.1.29 --- news/pl/2009090201.xml | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/news/pl/2009090201.xml b/news/pl/2009090201.xml new file mode 100644 index 0000000..08bdc9b --- /dev/null +++ b/news/pl/2009090201.xml @@ -0,0 +1,16 @@ +<news> +<date>Wrzesień 2, 2009</date> +<title>Wydano Wine 1.1.29</title> +<body> +<p> Wydanie rozwojowe Wine 1.1.29 jest już dostępne.</p> +<p> <a href="{$root}/announce/1.1.29">Co nowego</a> w tym wydaniu: +<ul> + <li>Ulepszona integracja Gecko poprzez użycie warstw sieciowych Wine.</li> + <li>Użycie zewnętrznego libmpg123 do dekodowania mp3.</li> + <li>Wsparcie dla formatów JPEG i PNG w WindowsCodecs.</li> + <li>Wiele poprawek testów regresji dla Win64 i Windows 7.</li> + <li>Rozmaite poprawki błędów.</li> +</ul></p> +<p><p>Źródło jest <a href="
http://prdownloads.sourceforge.net/wine/wine-1.1.29.tar.bz2
">już dostępne</a>. +Paczki binarne są w trakcie budowy i ukażą się wkróce w przeznaczonych dla nich <a href="{$root}/download">pobieralniach</a>. +</p></body></news>
1
0
0
0
Paul Vriens : wininet/tests: Fix a test failure on IE8.
by Alexandre Julliard
10 Sep '09
10 Sep '09
Module: wine Branch: master Commit: bf1b965e96e695f376ddf9140e4c17e687771899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf1b965e96e695f376ddf9140…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Sep 10 15:17:17 2009 +0200 wininet/tests: Fix a test failure on IE8. --- dlls/wininet/tests/http.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index b11cb2c..dda4a41 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -1162,13 +1162,20 @@ static void test_http_cache(void) ok(ret, "HttpSendRequest failed: %u\n", GetLastError()); size = sizeof(file_name); + file_name[0] = 0; ret = InternetQueryOptionA(request, INTERNET_OPTION_DATAFILE_NAME, file_name, &size); - ok(ret, "InternetQueryOptionA(INTERNET_OPTION_DATAFILE_NAME) failed %u\n", GetLastError()); - - file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, + if (ret) + { + file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError()); - CloseHandle(file); + ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError()); + CloseHandle(file); + } + else + { + /* < IE8 */ + ok(file_name[0] == 0, "Didn't expect a file name\n"); + } ok(InternetCloseHandle(request), "Close request handle failed\n"); ok(InternetCloseHandle(connect), "Close connect handle failed\n");
1
0
0
0
Roderick Colenbrander : winex11: Fix a null pointer bug in ToLogical in case of 8-bit. Move the code to the place where the shifts are needed.
by Alexandre Julliard
10 Sep '09
10 Sep '09
Module: wine Branch: master Commit: 2d1f55cce285f75f72393e699acd725ffe177bb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d1f55cce285f75f72393e699…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Thu Sep 10 15:00:17 2009 +0200 winex11: Fix a null pointer bug in ToLogical in case of 8-bit. Move the code to the place where the shifts are needed. --- dlls/winex11.drv/palette.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c index 2f3600f..81bb73b 100644 --- a/dlls/winex11.drv/palette.c +++ b/dlls/winex11.drv/palette.c @@ -791,10 +791,6 @@ BOOL X11DRV_IsSolidColor( COLORREF color ) COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel) { XColor color; - ColorShifts *shifts = &X11DRV_PALETTE_default_shifts; - - if(physDev->color_shifts) - shifts = physDev->color_shifts; #if 0 /* truecolor visual */ @@ -806,6 +802,11 @@ COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel) if ( (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED) && !X11DRV_PALETTE_Graymax ) { + ColorShifts *shifts = &X11DRV_PALETTE_default_shifts; + + if(physDev->color_shifts) + shifts = physDev->color_shifts; + color.red = (pixel >> shifts->logicalRed.shift) & shifts->logicalRed.max; if (shifts->logicalRed.scale<8) color.red= color.red << (8-shifts->logicalRed.scale) |
1
0
0
0
Alexandre Julliard : msvcrt/tests: Add tests for the handle inheritance block.
by Alexandre Julliard
10 Sep '09
10 Sep '09
Module: wine Branch: master Commit: da2db26dec5e67e470f76217d40eb48fc2d267e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da2db26dec5e67e470f76217d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 10 15:29:35 2009 +0200 msvcrt/tests: Add tests for the handle inheritance block. Based on a patch by André Hentschel. --- dlls/msvcrt/tests/file.c | 137 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 136 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index d405656..e652985 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -857,12 +857,89 @@ static void test_file_inherit_child_no(const char* fd_s) ok( ret == -1 && errno == EBADF, "Wrong write result in child process on %d (%s)\n", fd, strerror(errno)); } - + +static void create_io_inherit_block( STARTUPINFO *startup, unsigned int count, const HANDLE *handles ) +{ + static BYTE block[1024]; + BYTE *wxflag_ptr; + HANDLE *handle_ptr; + unsigned int i; + + startup->lpReserved2 = block; + startup->cbReserved2 = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * count; + wxflag_ptr = block + sizeof(unsigned); + handle_ptr = (HANDLE *)(wxflag_ptr + count); + + *(unsigned*)block = count; + for (i = 0; i < count; i++) + { + wxflag_ptr[i] = 0x81; + handle_ptr[i] = handles[i]; + } +} + +static const char *read_file( HANDLE file ) +{ + static char buffer[128]; + DWORD ret; + SetFilePointer( file, 0, NULL, FILE_BEGIN ); + if (!ReadFile( file, buffer, sizeof(buffer) - 1, &ret, NULL)) ret = 0; + buffer[ret] = 0; + return buffer; +} + +static void test_stdout_handle( STARTUPINFO *startup, char *cmdline, HANDLE hstdout, BOOL expect_stdout, + const char *descr ) +{ + const char *data; + HANDLE hErrorFile; + SECURITY_ATTRIBUTES sa; + PROCESS_INFORMATION proc; + + /* make file handle inheritable */ + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + + hErrorFile = CreateFileA( "fdopen.err", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + startup->dwFlags = STARTF_USESTDHANDLES; + startup->hStdInput = GetStdHandle( STD_INPUT_HANDLE ); + startup->hStdOutput = hErrorFile; + startup->hStdError = GetStdHandle( STD_ERROR_HANDLE ); + + CreateProcessA( NULL, cmdline, NULL, NULL, TRUE, + CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, NULL, NULL, startup, &proc ); + winetest_wait_child_process( proc.hProcess ); + + data = read_file( hErrorFile ); + if (expect_stdout) + ok( strcmp( data, "Success" ), "%s: Error file shouldn't contain data\n", descr ); + else + ok( !strcmp( data, "Success" ), "%s: Wrong error data (%s)\n", descr, data ); + + if (hstdout) + { + data = read_file( hstdout ); + if (expect_stdout) + ok( !strcmp( data, "Success" ), "%s: Wrong stdout data (%s)\n", descr, data ); + else + ok( strcmp( data, "Success" ), "%s: Stdout file shouldn't contain data\n", descr ); + } + + CloseHandle( hErrorFile ); + DeleteFile( "fdopen.err" ); +} + static void test_file_inherit( const char* selfname ) { int fd; const char* arg_v[5]; char buffer[16]; + char cmdline[MAX_PATH]; + STARTUPINFO startup; + SECURITY_ATTRIBUTES sa; + HANDLE handles[3]; fd = open ("fdopen.tst", O_CREAT | O_RDWR | O_BINARY, _S_IREAD |_S_IWRITE); ok(fd != -1, "Couldn't create test file\n"); @@ -890,6 +967,64 @@ static void test_file_inherit( const char* selfname ) ok(read(fd, buffer, sizeof (buffer)) == 0, "Found unexpected data (%s)\n", buffer); close (fd); ok(unlink("fdopen.tst") == 0, "Couldn't unlink\n"); + + /* make file handle inheritable */ + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + sprintf(cmdline, "%s file inherit 1", selfname); + + /* init an empty Reserved2, which should not be recognized as inherit-block */ + ZeroMemory(&startup, sizeof(STARTUPINFO)); + startup.cb = sizeof(startup); + create_io_inherit_block( &startup, 0, NULL ); + test_stdout_handle( &startup, cmdline, 0, FALSE, "empty block" ); + + /* test with valid inheritblock */ + handles[0] = GetStdHandle( STD_INPUT_HANDLE ); + handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + handles[2] = GetStdHandle( STD_ERROR_HANDLE ); + create_io_inherit_block( &startup, 3, handles ); + test_stdout_handle( &startup, cmdline, handles[1], TRUE, "valid block" ); + CloseHandle( handles[1] ); + DeleteFile("fdopen.tst"); + + /* test inherit block starting with unsigned zero */ + handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + create_io_inherit_block( &startup, 3, handles ); + *(unsigned int *)startup.lpReserved2 = 0; + test_stdout_handle( &startup, cmdline, handles[1], FALSE, "zero count block" ); + CloseHandle( handles[1] ); + DeleteFile("fdopen.tst"); + + /* test inherit block with smaller size */ + handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + create_io_inherit_block( &startup, 3, handles ); + startup.cbReserved2 -= 3; + test_stdout_handle( &startup, cmdline, handles[1], TRUE, "small size block" ); + CloseHandle( handles[1] ); + DeleteFile("fdopen.tst"); + + /* test inherit block with even smaller size */ + handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + create_io_inherit_block( &startup, 3, handles ); + startup.cbReserved2 = sizeof(unsigned int) + sizeof(HANDLE) + sizeof(char); + test_stdout_handle( &startup, cmdline, handles[1], FALSE, "smaller size block" ); + CloseHandle( handles[1] ); + DeleteFile("fdopen.tst"); + + /* test inherit block with larger size */ + handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); + create_io_inherit_block( &startup, 3, handles ); + startup.cbReserved2 += 7; + test_stdout_handle( &startup, cmdline, handles[1], TRUE, "large size block" ); + CloseHandle( handles[1] ); + DeleteFile("fdopen.tst"); } static void test_tmpnam( void )
1
0
0
0
Alexandre Julliard : msvcrt: Add validity checks on the size of the handle inheritance block.
by Alexandre Julliard
10 Sep '09
10 Sep '09
Module: wine Branch: master Commit: ded81aebc7ca9fe7a3362ec1b462dabad5e7986e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ded81aebc7ca9fe7a3362ec1b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 10 15:29:04 2009 +0200 msvcrt: Add validity checks on the size of the handle inheritance block. --- dlls/msvcrt/file.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 6671f2f..cbaa04e 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -349,18 +349,19 @@ void msvcrt_init_io(void) InitializeCriticalSection(&MSVCRT_file_cs); MSVCRT_file_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MSVCRT_file_cs"); GetStartupInfoA(&si); - if (si.cbReserved2 != 0 && si.lpReserved2 != NULL) + if (si.cbReserved2 >= sizeof(unsigned int) && si.lpReserved2 != NULL) { - char* wxflag_ptr; + BYTE* wxflag_ptr; HANDLE* handle_ptr; + unsigned int count; - MSVCRT_fdend = *(unsigned*)si.lpReserved2; + count = *(unsigned*)si.lpReserved2; + wxflag_ptr = si.lpReserved2 + sizeof(unsigned); + handle_ptr = (HANDLE*)(wxflag_ptr + count); - wxflag_ptr = (char*)(si.lpReserved2 + sizeof(unsigned)); - handle_ptr = (HANDLE*)(wxflag_ptr + MSVCRT_fdend * sizeof(char)); - - MSVCRT_fdend = min(MSVCRT_fdend, sizeof(MSVCRT_fdesc) / sizeof(MSVCRT_fdesc[0])); - for (i = 0; i < MSVCRT_fdend; i++) + count = min(count, (si.cbReserved2 - sizeof(unsigned)) / (sizeof(HANDLE) + 1)); + count = min(count, sizeof(MSVCRT_fdesc) / sizeof(MSVCRT_fdesc[0])); + for (i = 0; i < count; i++) { if ((*wxflag_ptr & WX_OPEN) && *handle_ptr != INVALID_HANDLE_VALUE) { @@ -374,6 +375,7 @@ void msvcrt_init_io(void) } wxflag_ptr++; handle_ptr++; } + MSVCRT_fdend = max( 3, count ); for (MSVCRT_fdstart = 3; MSVCRT_fdstart < MSVCRT_fdend; MSVCRT_fdstart++) if (MSVCRT_fdesc[MSVCRT_fdstart].handle == INVALID_HANDLE_VALUE) break; }
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
87
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
Results per page:
10
25
50
100
200