diff options
author | reggie@mdk10.(none) <> | 2005-05-20 16:04:10 -0500 |
---|---|---|
committer | reggie@mdk10.(none) <> | 2005-05-20 16:04:10 -0500 |
commit | 48c584537d3f45263be1fa8bbadab5c14267d3ff (patch) | |
tree | 3c11d9563166e2b2ee03a1165069c1f02dfba30a /mysys/mf_pack.c | |
parent | d7a98ea7b8812dd63f5eb2cceaa2adaa5c0525dc (diff) | |
download | mariadb-git-48c584537d3f45263be1fa8bbadab5c14267d3ff.tar.gz |
BUG# 9148: Denial of service
The problem was that on Windows the access method indicates that access to file
such as "com1" and "lpt1" is allowed (since they are device names) and
this causes mysql to attempt to open them as databases or tables.
The fix was to write our own my_access method that uses other Win32 functions
to determine if the given argument is indeed a file and has to requested
mode.
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r-- | mysys/mf_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index 9193238708d..79b194289c6 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -226,7 +226,7 @@ void symdirget(char *dir) { char buff[FN_REFLEN]; char *pos=strend(dir); - if (dir[0] && pos[-1] != FN_DEVCHAR && access(dir, F_OK)) + if (dir[0] && pos[-1] != FN_DEVCHAR && !my_access(dir, F_OK)) { File file; uint length; |