Prevent wildcards from being accepted in filenames (NT mode)
Shachar Shemesh
wine-patches at shemesh.biz
Wed Nov 26 12:48:18 CST 2003
Changelog
Shachar Shemesh <winecode at shemesh.biz>
* files/dos_fs.c
o If in NT mode, a filename containing wildcards characters (?
and *) is rejected with ERROR_BAD_PATHNAME
--
Shachar Shemesh
Open Source integration & consulting
Home page & resume - http://www.shemesh.biz/
-------------- next part --------------
Index: files/dos_fs.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/files/dos_fs.c,v
retrieving revision 1.142
diff -u -r1.142 dos_fs.c
--- files/dos_fs.c 15 Nov 2003 00:13:21 -0000 1.142
+++ files/dos_fs.c 26 Nov 2003 18:43:40 -0000
@@ -1047,6 +1047,13 @@
return FALSE;
}
+ /* If wer'e in NT mode - don't allow wildcards in file name */
+ if( (strchrW(name, '?') || strchrW(name, '*')) && (GetVersion()&0x80000000)==0 )
+ {
+ SetLastError(ERROR_INVALID_NAME);
+ return FALSE;
+ }
+
if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
flags = DRIVE_GetFlags( full->drive );
More information about the wine-patches
mailing list