1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG# 9148 Denial of service

fixups of test case and comment formatting


BitKeeper/deleted/.del-reserved_win_names-master.opt~e56da049a7ce9a5b:
  ***MISSING TEXT***
mysql-test/r/lowercase_table.result:
  added my test for bug #9148 to this test case
mysql-test/t/lowercase_table.test:
  added my test for bug #9148 to this test case
mysys/my_fopen.c:
  reformatted comments
mysys/my_open.c:
  reformatted comments
This commit is contained in:
unknown
2005-05-23 14:48:25 -05:00
parent 442c072fdf
commit 97bde75e4e
5 changed files with 24 additions and 6 deletions

View File

@ -83,3 +83,9 @@ create table t2 like T1;
drop table t1, t2; drop table t1, t2;
show tables; show tables;
Tables_in_test Tables_in_test
use lpt1;
ERROR 42000: Unknown database 'lpt1'
use com1;
ERROR 42000: Unknown database 'com1'
use prn;
ERROR 42000: Unknown database 'prn'

View File

@ -82,3 +82,14 @@ create table t2 like T1;
drop table t1, t2; drop table t1, t2;
show tables; show tables;
#
#Bug 9148: Denial of service
#
--error 1049
use lpt1;
--error 1049
use com1;
--error 1049
use prn;

View File

@ -1 +0,0 @@
--lower_case_table_names=1

View File

@ -34,8 +34,9 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d", DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags)); FileName, Flags, MyFlags));
/* /*
* if we are not creating, then we need to use my_access to make sure if we are not creating, then we need to use my_access to make sure
* the file exists since Windows doesn't handle files like "com1.sym" very well the file exists since Windows doesn't handle files like "com1.sym"
very well
*/ */
#ifdef __WIN__ #ifdef __WIN__
if (! (Flags & O_CREAT) && my_access(FileName, F_OK)) if (! (Flags & O_CREAT) && my_access(FileName, F_OK))

View File

@ -46,9 +46,10 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d", DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags)); FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2) #if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
/* if we are not creating, then we need to use my_access to make /*
* sure the file exists since Windows doesn't handle files like if we are not creating, then we need to use my_access to make
* "com1.sym" very well sure the file exists since Windows doesn't handle files like
"com1.sym" very well
*/ */
if (! (Flags & O_CREAT) && my_access(FileName, F_OK)) if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
return -1; return -1;