Commit 3384ecc9 authored by reggie@mdk10.(none)'s avatar reggie@mdk10.(none)

BUG# 9148 Denial of service

fixups of test case and comment formatting
parent 78b40d0a
...@@ -83,3 +83,9 @@ create table t2 like T1; ...@@ -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'
...@@ -82,3 +82,14 @@ create table t2 like T1; ...@@ -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;
...@@ -34,8 +34,9 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags) ...@@ -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))
......
...@@ -46,9 +46,10 @@ File my_open(const char *FileName, int Flags, myf MyFlags) ...@@ -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;
......
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