Commit cccf60ee authored by unknown's avatar unknown

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 455b259d
......@@ -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'
......@@ -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;
......@@ -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))
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment