Commit 97bde75e authored by unknown's avatar unknown
Browse files

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
parent 442c072f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -83,3 +83,9 @@ create table t2 like T1;
drop table t1, t2;
show tables;
Tables_in_test
use lpt1;
ERROR 42000: Unknown database 'lpt1'
use com1;
ERROR 42000: Unknown database 'com1'
use prn;
ERROR 42000: Unknown database 'prn'
+11 −0
Original line number Diff line number Diff line
@@ -82,3 +82,14 @@ create table t2 like T1;
drop table t1, t2;

show tables;

#
#Bug 9148: Denial of service
#
--error 1049
use lpt1;
--error 1049
use com1;
--error 1049
use prn;
+0 −1
Original line number Diff line number Diff line
--lower_case_table_names=1
+3 −2
Original line number Diff line number Diff line
@@ -34,8 +34,9 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
  DBUG_PRINT("my",("Name: '%s'  Flags: %d  MyFlags: %d",
		   FileName, Flags, MyFlags));
  /* 
   * 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 
    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 
  */
#ifdef __WIN__
  if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
+4 −3
Original line number Diff line number Diff line
@@ -46,9 +46,10 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
  DBUG_PRINT("my",("Name: '%s'  Flags: %d  MyFlags: %d",
		   FileName, Flags, MyFlags));
#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 
   * "com1.sym" very  well 
  /* 
    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 
  */  
  if (! (Flags & O_CREAT) && my_access(FileName, F_OK))    
	  return -1;