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
December 2010
----- 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
1099 discussions
Start a n
N
ew thread
Dan Kegel : ws2_32: Null select() should fail with WSAEINVAL.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 6eb260766cdb37616374fb4c7e11f113cc047c88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6eb260766cdb37616374fb4c7…
Author: Dan Kegel <dank(a)kegel.com> Date: Mon Oct 18 10:42:16 2010 +0000 ws2_32: Null select() should fail with WSAEINVAL. (cherry picked from commit 6733c40d789744ec0ee6fa30f8e14816968a0887) --- dlls/ws2_32/socket.c | 8 ++++++-- dlls/ws2_32/tests/sock.c | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 4c8a2db..8dffeeb 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2975,7 +2975,11 @@ static struct pollfd *fd_sets_to_poll( const WS_fd_set *readfds, const WS_fd_set if (writefds) count += writefds->fd_count; if (exceptfds) count += exceptfds->fd_count; *count_ptr = count; - if (!count) return NULL; + if (!count) + { + SetLastError(WSAEINVAL); + return NULL; + } if (!(fds = HeapAlloc( GetProcessHeap(), 0, count * sizeof(fds[0])))) { SetLastError( ERROR_NOT_ENOUGH_MEMORY ); @@ -3098,7 +3102,7 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds, TRACE("read %p, write %p, excp %p timeout %p\n", ws_readfds, ws_writefds, ws_exceptfds, ws_timeout); - if (!(pollfds = fd_sets_to_poll( ws_readfds, ws_writefds, ws_exceptfds, &count )) && count) + if (!(pollfds = fd_sets_to_poll( ws_readfds, ws_writefds, ws_exceptfds, &count ))) return SOCKET_ERROR; if (ws_timeout) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 8d7c7a6..96430ff 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1941,6 +1941,17 @@ static void test_select(void) FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); + + SetLastError(0); + ret = select(maxfd+1, 0, 0, 0, &select_timeout); + ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); + ok ( GetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", ret); + + SetLastError(0); + ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout); + ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); + ok ( GetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", ret); + FD_SET(INVALID_SOCKET, &readfds); SetLastError(0); ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout);
1
0
0
0
Alexandre Julliard : winedbg: Don' t start another instance of the debugger when it crashes.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 1f7822981bf6bf457dddbb46eecd606c797f7404 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f7822981bf6bf457dddbb46e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 26 12:55:53 2010 +0200 winedbg: Don't start another instance of the debugger when it crashes. (cherry picked from commit 052eb24b03ff0a2b32887518395154d4c7351bc2) --- programs/winedbg/winedbg.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index 3e64506..a074098 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -603,6 +603,12 @@ void dbg_start_interactive(HANDLE hFile) dbg_save_internal_vars(); } +static LONG CALLBACK top_filter( EXCEPTION_POINTERS *ptr ) +{ + dbg_printf( "winedbg: Internal crash at %p\n", ptr->ExceptionRecord->ExceptionAddress ); + return EXCEPTION_EXECUTE_HANDLER; +} + struct backend_cpu* be_cpu; #ifdef __i386__ extern struct backend_cpu be_i386; @@ -636,6 +642,8 @@ int main(int argc, char** argv) /* Initialize the output */ dbg_houtput = GetStdHandle(STD_OUTPUT_HANDLE); + SetUnhandledExceptionFilter( top_filter ); + /* Initialize internal vars */ if (!dbg_load_internal_vars()) return -1;
1
0
0
0
Alexandre Julliard : winegcc: Fix the lib dir detection.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 8fdb4620bdeae112a349bf37387744c566b39417 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fdb4620bdeae112a349bf373…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 28 11:45:05 2010 +0200 winegcc: Fix the lib dir detection. Spotted by André Hentschel. (cherry picked from commit 62f9966fdc8e37720d9ad60a87592b0a593a03a9) --- tools/winegcc/winegcc.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index c5b8537..dbf66c8 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -339,28 +339,36 @@ static int check_platform( struct options *opts, const char *file ) static char *get_lib_dir( struct options *opts ) { static const char *stdlibpath[] = { LIBDIR, "/usr/lib", "/usr/local/lib", "/lib" }; + static const char libwine[] = "/libwine.so"; unsigned int i; for (i = 0; i < sizeof(stdlibpath)/sizeof(stdlibpath[0]); i++) { - char *p, *buffer = xmalloc( strlen(stdlibpath[i]) + sizeof("32/libwine.so") ); + char *p, *buffer = xmalloc( strlen(stdlibpath[i]) + strlen(libwine) + 3 ); strcpy( buffer, stdlibpath[i] ); p = buffer + strlen(buffer); while (p > buffer && p[-1] == '/') p--; - strcpy( p, "/libwine.so" ); - if (check_platform( opts, buffer )) return buffer; + strcpy( p, libwine ); + if (check_platform( opts, buffer )) goto found; if (p > buffer + 2 && (!memcmp( p - 2, "32", 2 ) || !memcmp( p - 2, "64", 2 ))) p -= 2; if (opts->force_pointer_size == 4 || (!opts->force_pointer_size && opts->target_cpu != CPU_x86_64)) { - strcpy( p, "32/libwine.so" ); - if (check_platform( opts, buffer )) return buffer; + strcpy( p, "32" ); + strcat( p, libwine ); + if (check_platform( opts, buffer )) goto found; } if (opts->force_pointer_size == 8 || (!opts->force_pointer_size && opts->target_cpu == CPU_x86_64)) { - strcpy( p, "64/libwine.so" ); - if (check_platform( opts, buffer )) return buffer; + strcpy( p, "64" ); + strcat( p, libwine ); + if (check_platform( opts, buffer )) goto found; } free( buffer ); + continue; + + found: + buffer[strlen(buffer) - strlen(libwine)] = 0; + return buffer; } return xstrdup( LIBDIR ); }
1
0
0
0
Alexandre Julliard : winegcc: Detect the appropriate lib directory for 32/ 64 cross-builds.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 955d9a24c58a4cb8b94402e0dd4da6452601f976 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=955d9a24c58a4cb8b94402e0d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 25 20:42:00 2010 +0200 winegcc: Detect the appropriate lib directory for 32/64 cross-builds. (cherry picked from commit 81b1c3ed60855d317ed3828b7e2378f63e5c73bf) --- tools/winegcc/winegcc.c | 60 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 3 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 5fed4a3..c5b8537 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -311,6 +311,60 @@ static const strarray* get_translator(struct options *opts) return ret; } +/* check that file is a library for the correct platform */ +static int check_platform( struct options *opts, const char *file ) +{ + int ret = 0, fd = open( file, O_RDONLY ); + if (fd != -1) + { + unsigned char header[16]; + if (read( fd, header, sizeof(header) ) == sizeof(header)) + { + /* FIXME: only ELF is supported, platform is not checked beyond 32/64 */ + if (!memcmp( header, "\177ELF", 4 )) + { + if (header[4] == 2) /* 64-bit */ + ret = (opts->force_pointer_size == 8 || + (!opts->force_pointer_size && opts->target_cpu == CPU_x86_64)); + else + ret = (opts->force_pointer_size == 4 || + (!opts->force_pointer_size && opts->target_cpu != CPU_x86_64)); + } + } + close( fd ); + } + return ret; +} + +static char *get_lib_dir( struct options *opts ) +{ + static const char *stdlibpath[] = { LIBDIR, "/usr/lib", "/usr/local/lib", "/lib" }; + unsigned int i; + + for (i = 0; i < sizeof(stdlibpath)/sizeof(stdlibpath[0]); i++) + { + char *p, *buffer = xmalloc( strlen(stdlibpath[i]) + sizeof("32/libwine.so") ); + strcpy( buffer, stdlibpath[i] ); + p = buffer + strlen(buffer); + while (p > buffer && p[-1] == '/') p--; + strcpy( p, "/libwine.so" ); + if (check_platform( opts, buffer )) return buffer; + if (p > buffer + 2 && (!memcmp( p - 2, "32", 2 ) || !memcmp( p - 2, "64", 2 ))) p -= 2; + if (opts->force_pointer_size == 4 || (!opts->force_pointer_size && opts->target_cpu != CPU_x86_64)) + { + strcpy( p, "32/libwine.so" ); + if (check_platform( opts, buffer )) return buffer; + } + if (opts->force_pointer_size == 8 || (!opts->force_pointer_size && opts->target_cpu == CPU_x86_64)) + { + strcpy( p, "64/libwine.so" ); + if (check_platform( opts, buffer )) return buffer; + } + free( buffer ); + } + return xstrdup( LIBDIR ); +} + static void compile(struct options* opts, const char* lang) { strarray* comp_args = strarray_alloc(); @@ -577,7 +631,6 @@ static const char *mingw_unicode_hack( struct options *opts ) static void build(struct options* opts) { - static const char *stdlibpath[] = { DLLDIR, LIBDIR, "/usr/lib", "/usr/local/lib", "/lib" }; strarray *lib_dirs, *files; strarray *spec_args, *link_args; char *output_file; @@ -627,9 +680,10 @@ static void build(struct options* opts) /* prepare the linking path */ if (!opts->wine_objdir) { + char *lib_dir = get_lib_dir( opts ); lib_dirs = strarray_dup(opts->lib_dirs); - for ( j = 0; j < sizeof(stdlibpath)/sizeof(stdlibpath[0]); j++ ) - strarray_add(lib_dirs, stdlibpath[j]); + strarray_add( lib_dirs, strmake( "%s/wine", lib_dir )); + strarray_add( lib_dirs, lib_dir ); } else {
1
0
0
0
Alexandre Julliard : kernel32: Fix a FAT format sanity check for floppies.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 277061efb96784e935d02911deb620426dae1bda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=277061efb96784e935d02911d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 25 12:40:54 2010 +0200 kernel32: Fix a FAT format sanity check for floppies. (cherry picked from commit 1379269587e6f158a22e2bc784861a881e23f3d1) --- dlls/kernel32/volume.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 002a7e6..9810260 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -336,7 +336,7 @@ static enum fs_type VOLUME_ReadFATSuperblock( HANDLE handle, BYTE *buff ) reasonable = num_boot_sectors < total_sectors && num_fats < 16 && bytes_per_sector >= 512 && bytes_per_sector % 512 == 0 && - sectors_per_cluster > 1; + sectors_per_cluster >= 1; if (!reasonable) return FS_UNKNOWN; sectors = total_sectors - num_boot_sectors - num_fats * sect_per_fat - (num_root_dir_ents * 32 + bytes_per_sector - 1) / bytes_per_sector;
1
0
0
0
Alexandre Julliard : configure: More aggressive disabling of Fortify.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 07ccfd952eb709fd264fdc88835316bad17d45cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07ccfd952eb709fd264fdc888…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 29 14:25:01 2010 +0200 configure: More aggressive disabling of Fortify. (cherry picked from commit b10fb86a91c0fcef9db236076929842c8dc45baa) --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1832286..b92e6a0 100755 --- a/configure +++ b/configure @@ -11970,7 +11970,7 @@ fi $as_echo "$ac_cv_c_fortify_enabled" >&6; } if test "$ac_cv_c_fortify_enabled" = yes then - EXTRACFLAGS="$EXTRACFLAGS -D_FORTIFY_SOURCE=0" + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" fi diff --git a/configure.ac b/configure.ac index 8d1d298..85c6017 100644 --- a/configure.ac +++ b/configure.ac @@ -1636,7 +1636,7 @@ AC_CACHE_CHECK([for the need to disable Fortify], ac_cv_c_fortify_enabled, [ac_cv_c_fortify_enabled=no],[ac_cv_c_fortify_enabled=yes])) if test "$ac_cv_c_fortify_enabled" = yes then - EXTRACFLAGS="$EXTRACFLAGS -D_FORTIFY_SOURCE=0" + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" fi dnl **** Check for underscore on external symbols ****
1
0
0
0
Alexandre Julliard : configure: Disable Fortify if it's enabled by default, it's too broken.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: ce6a613147264988fc065cc1b9d578d7d1cc9b52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce6a613147264988fc065cc1b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 22 17:13:57 2010 +0200 configure: Disable Fortify if it's enabled by default, it's too broken. (cherry picked from commit 105793bff75f6a869bd9ccfb390b2f88fa861235) --- configure | 33 +++++++++++++++++++++++++++++++++ configure.ac | 13 +++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/configure b/configure index ab8f4dd..1832286 100755 --- a/configure +++ b/configure @@ -11941,6 +11941,39 @@ $as_echo "#define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__))" >>con fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the need to disable Fortify" >&5 +$as_echo_n "checking for the need to disable Fortify... " >&6; } +if test "${ac_cv_c_fortify_enabled+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> +int +main () +{ +#if defined(__USE_FORTIFY_LEVEL) && __USE_FORTIFY_LEVEL > 0 +#error Fortify enabled +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_fortify_enabled=no +else + ac_cv_c_fortify_enabled=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fortify_enabled" >&5 +$as_echo "$ac_cv_c_fortify_enabled" >&6; } +if test "$ac_cv_c_fortify_enabled" = yes +then + EXTRACFLAGS="$EXTRACFLAGS -D_FORTIFY_SOURCE=0" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether external symbols need an underscore prefix" >&5 $as_echo_n "checking whether external symbols need an underscore prefix... " >&6; } if test "${ac_cv_c_extern_prefix+set}" = set; then : diff --git a/configure.ac b/configure.ac index 76999c3..8d1d298 100644 --- a/configure.ac +++ b/configure.ac @@ -1626,6 +1626,19 @@ then fi fi +dnl **** Disable Fortify, it has too many false positives + +AC_CACHE_CHECK([for the need to disable Fortify], ac_cv_c_fortify_enabled, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], +[[#if defined(__USE_FORTIFY_LEVEL) && __USE_FORTIFY_LEVEL > 0 +#error Fortify enabled +#endif]])], + [ac_cv_c_fortify_enabled=no],[ac_cv_c_fortify_enabled=yes])) +if test "$ac_cv_c_fortify_enabled" = yes +then + EXTRACFLAGS="$EXTRACFLAGS -D_FORTIFY_SOURCE=0" +fi + dnl **** Check for underscore on external symbols **** AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
1
0
0
0
Alexandre Julliard : kernel32: Use RtlDosPathNameToNtPathName_U to validate the path in GetVolumeInformationW .
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 56c2c8c75c6819a8654453b17738964094ede701 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56c2c8c75c6819a8654453b17…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 20 12:17:35 2010 +0200 kernel32: Use RtlDosPathNameToNtPathName_U to validate the path in GetVolumeInformationW. (cherry picked from commit ee0f0da69b3a99ce6b682b38fc6910a253ca23f8) --- dlls/kernel32/tests/volume.c | 9 ++++----- dlls/kernel32/volume.c | 35 +++++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index f52c592..534f0e3 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -324,7 +324,6 @@ static void test_GetVolumeInformationA(void) ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - todo_wine ok(ret, "GetVolumeInformationA root failed, last error %u\n", GetLastError()); /* check for error on no trailing \ when current dir is subdir (windows) of queried drive */ @@ -392,7 +391,7 @@ static void test_GetVolumeInformationA(void) /* \ is current on root drive, call succeeds */ ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - todo_wine ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); /* again, SetCurrentDirectory on another drive does not matter */ ret = SetCurrentDirectory(Root_Slash); @@ -403,7 +402,7 @@ static void test_GetVolumeInformationA(void) /* \ is current on root drive, call succeeds */ ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, NULL, NULL, fs_name_buf, fs_name_len); - todo_wine ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); + ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); } /* try null root directory to return "root of the current directory" */ @@ -420,7 +419,7 @@ static void test_GetVolumeInformationA(void) SetLastError(0xdeadbeef); ret = pGetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - todo_wine ok(ret || broken(!ret /* win9x */ && GetLastError()==ERROR_BAD_NETPATH), + ok(ret || broken(!ret /* win9x */ && GetLastError()==ERROR_BAD_NETPATH), "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); /* try again with device name space */ @@ -428,7 +427,7 @@ static void test_GetVolumeInformationA(void) SetLastError(0xdeadbeef); ret = pGetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - todo_wine ok(ret || broken(!ret /* win9x */ && GetLastError()==ERROR_BAD_NETPATH), + ok(ret || broken(!ret /* win9x */ && GetLastError()==ERROR_BAD_NETPATH), "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); /* try again with a directory off the root - should generate error */ diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 7596864..002a7e6 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -513,26 +513,29 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len, static const WCHAR fat32W[] = {'F','A','T','3','2',0}; static const WCHAR ntfsW[] = {'N','T','F','S',0}; static const WCHAR cdfsW[] = {'C','D','F','S',0}; + static const WCHAR default_rootW[] = {'\\',0}; WCHAR device[] = {'\\','\\','.','\\','A',':',0}; HANDLE handle; + UNICODE_STRING nt_name; + WCHAR *p; enum fs_type type = FS_UNKNOWN; + BOOL ret = FALSE; - if (!root) + if (!root) root = default_rootW; + if (!RtlDosPathNameToNtPathName_U( root, &nt_name, NULL, NULL )) { - WCHAR path[MAX_PATH]; - GetCurrentDirectoryW( MAX_PATH, path ); - device[4] = path[0]; + SetLastError( ERROR_PATH_NOT_FOUND ); + return FALSE; } - else + /* there must be exactly one backslash in the name, at the end */ + p = memchrW( nt_name.Buffer + 4, '\\', (nt_name.Length - 4) / sizeof(WCHAR) ); + if (p != nt_name.Buffer + nt_name.Length / sizeof(WCHAR) - 1) { - if (!root[0] || root[1] != ':' || root[lstrlenW(root)-1] != '\\' ) - { - SetLastError( ERROR_INVALID_NAME ); - return FALSE; - } - device[4] = root[0]; + SetLastError( ERROR_INVALID_NAME ); + goto done; } + device[4] = nt_name.Buffer[4]; /* try to open the device */ @@ -566,7 +569,7 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len, } CloseHandle( handle ); TRACE( "%s: found fs type %d\n", debugstr_w(device), type ); - if (type == FS_ERROR) return FALSE; + if (type == FS_ERROR) goto done; if (label && label_len) VOLUME_GetSuperblockLabel( device, type, superblock, label, label_len ); if (serial) *serial = VOLUME_GetSuperblockSerial( device, type, superblock ); @@ -581,7 +584,7 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len, case DRIVE_UNKNOWN: case DRIVE_NO_ROOT_DIR: SetLastError( ERROR_NOT_READY ); - return FALSE; + goto done; case DRIVE_REMOVABLE: case DRIVE_FIXED: case DRIVE_REMOTE: @@ -618,7 +621,11 @@ fill_fs_info: /* now fill in the information that depends on the file system ty if (flags) *flags = FILE_CASE_PRESERVED_NAMES; break; } - return TRUE; + ret = TRUE; + +done: + RtlFreeUnicodeString( &nt_name ); + return ret; }
1
0
0
0
Jörg Höhle : kernel32/tests: GetVolumeInformationA X: succeeds iff drive's default dir is root.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: fd5c8b3e7309a2dc6101a30c008690b31f702be3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd5c8b3e7309a2dc6101a30c0…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Jul 28 21:23:47 2010 +0200 kernel32/tests: GetVolumeInformationA X: succeeds iff drive's default dir is root. (cherry picked from commit fc872628d9640c1441f8d6e332cccc62b6638cea) --- dlls/kernel32/tests/volume.c | 128 +++++++++++++++++++++++++++++++----------- 1 files changed, 94 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fd5c8b3e7309a2dc6101a…
1
0
0
0
Aleksey Bragin : msi: Fix freed memory access and fix freeing of invalid pointer.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 516616bf8e7755aa797aa1e4ce9a0e0bbe4f6f15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=516616bf8e7755aa797aa1e4c…
Author: Aleksey Bragin <aleksey(a)reactos.org> Date: Fri Oct 22 20:08:58 2010 +0400 msi: Fix freed memory access and fix freeing of invalid pointer. (cherry picked from commit 8c5718ec9d0613be7208e1ceaecac0e7434c4cf5) --- dlls/msi/action.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 7ae8286..eeb349b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1967,7 +1967,7 @@ static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param) VS_FIXEDFILEINFO *msi_get_disk_file_version( LPCWSTR filename ) { static const WCHAR name[] = {'\\',0}; - VS_FIXEDFILEINFO *ret; + VS_FIXEDFILEINFO *ptr, *ret; LPVOID version; DWORD versize, handle; UINT sz; @@ -1984,12 +1984,15 @@ VS_FIXEDFILEINFO *msi_get_disk_file_version( LPCWSTR filename ) GetFileVersionInfoW( filename, 0, versize, version ); - if (!VerQueryValueW( version, name, (LPVOID *)&ret, &sz )) + if (!VerQueryValueW( version, name, (LPVOID *)&ptr, &sz )) { msi_free( version ); return NULL; } + ret = msi_alloc( sz ); + memcpy( ret, ptr, sz ); + msi_free( version ); return ret; }
1
0
0
0
← Newer
1
...
98
99
100
101
102
103
104
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200