Bart Van Assche : ntdll: Avoid examining uninitialized data.
Alexandre Julliard
julliard at winehq.org
Thu Mar 31 12:43:44 CDT 2011
Module: wine
Branch: master
Commit: e5fe510720ba3d8a247a91e17d1b09bde5f268c3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5fe510720ba3d8a247a91e17d1b09bde5f268c3
Author: Bart Van Assche <bvanassche at acm.org>
Date: Wed Mar 30 20:50:12 2011 +0200
ntdll: Avoid examining uninitialized data.
---
dlls/ntdll/directory.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 66572da..b57741a 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -923,7 +923,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct statfs stfs;
- statfs( dir, &stfs );
+ if (statfs( dir, &stfs ) == -1) return FALSE;
/* Assume these file systems are always case insensitive on Mac OS.
* For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS
* is the only UNIX that supports case-insensitive lookup).
@@ -960,7 +960,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
#elif defined(__NetBSD__)
struct statvfs stfs;
- statvfs( dir, &stfs );
+ if (statvfs( dir, &stfs ) == -1) return FALSE;
/* Only assume CIOPFS is case insensitive. */
if (strcmp( stfs.f_fstypename, "fusefs" ) ||
strncmp( stfs.f_mntfromname, "ciopfs", 5 ))
@@ -973,7 +973,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
char *cifile;
/* Only assume CIOPFS is case insensitive. */
- statfs( dir, &stfs );
+ if (statfs( dir, &stfs ) == -1) return FALSE;
if (stfs.f_type != 0x65735546 /* FUSE_SUPER_MAGIC */)
return TRUE;
/* Normally, we'd have to parse the mtab to find out exactly what
@@ -2175,7 +2175,6 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
}
}
closedir( dir );
- goto not_found; /* avoid warning */
not_found:
unix_name[pos - 1] = 0;
More information about the wine-cvs
mailing list