Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3144d5eb
Commit
3144d5eb
authored
Apr 25, 2006
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buffer overflow and information exposure bugs fixed
(reported by Stefano Di Paola)
parent
750af5a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
sql/sql_parse.cc
sql/sql_parse.cc
+15
-0
No files found.
sql/sql_parse.cc
View file @
3144d5eb
...
@@ -647,6 +647,11 @@ check_connections(THD *thd)
...
@@ -647,6 +647,11 @@ check_connections(THD *thd)
char
*
db
=
0
;
char
*
db
=
0
;
if
(
thd
->
client_capabilities
&
CLIENT_CONNECT_WITH_DB
)
if
(
thd
->
client_capabilities
&
CLIENT_CONNECT_WITH_DB
)
db
=
strend
(
passwd
)
+
1
;
db
=
strend
(
passwd
)
+
1
;
if
(
strend
(
db
?
db
:
passwd
)
-
(
char
*
)
net
->
read_pos
>
pkt_len
)
{
inc_host_errors
(
&
thd
->
remote
.
sin_addr
);
return
ER_HANDSHAKE_ERROR
;
}
if
(
thd
->
client_capabilities
&
CLIENT_INTERACTIVE
)
if
(
thd
->
client_capabilities
&
CLIENT_INTERACTIVE
)
thd
->
variables
.
net_wait_timeout
=
thd
->
variables
.
net_interactive_timeout
;
thd
->
variables
.
net_wait_timeout
=
thd
->
variables
.
net_interactive_timeout
;
if
((
thd
->
client_capabilities
&
CLIENT_TRANSACTIONS
)
&&
if
((
thd
->
client_capabilities
&
CLIENT_TRANSACTIONS
)
&&
...
@@ -1002,7 +1007,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1002,7 +1007,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
statistic_increment
(
com_other
,
&
LOCK_status
);
statistic_increment
(
com_other
,
&
LOCK_status
);
slow_command
=
TRUE
;
slow_command
=
TRUE
;
uint
db_len
=
*
(
uchar
*
)
packet
;
uint
db_len
=
*
(
uchar
*
)
packet
;
if
(
db_len
>=
packet_length
||
db_len
>
NAME_LEN
)
{
send_error
(
&
thd
->
net
,
ER_UNKNOWN_COM_ERROR
);
break
;
}
uint
tbl_len
=
*
(
uchar
*
)(
packet
+
db_len
+
1
);
uint
tbl_len
=
*
(
uchar
*
)(
packet
+
db_len
+
1
);
if
(
db_len
+
tbl_len
+
2
>
packet_length
||
tbl_len
>
NAME_LEN
)
{
send_error
(
&
thd
->
net
,
ER_UNKNOWN_COM_ERROR
);
break
;
}
char
*
db
=
thd
->
alloc
(
db_len
+
tbl_len
+
2
);
char
*
db
=
thd
->
alloc
(
db_len
+
tbl_len
+
2
);
memcpy
(
db
,
packet
+
1
,
db_len
);
memcpy
(
db
,
packet
+
1
,
db_len
);
char
*
tbl_name
=
db
+
db_len
;
char
*
tbl_name
=
db
+
db_len
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment