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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8e9b79ca
Commit
8e9b79ca
authored
Jul 28, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
93bd65b0
53434623
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
sql/net_serv.cc
sql/net_serv.cc
+11
-2
No files found.
sql/net_serv.cc
View file @
8e9b79ca
...
...
@@ -188,10 +188,12 @@ my_bool net_realloc(NET *net, ulong length)
pkt_length
=
(
length
+
IO_SIZE
-
1
)
&
~
(
IO_SIZE
-
1
);
/*
We must allocate some extra bytes for the end 0 and to be able to
read big compressed blocks
read big compressed blocks + 1 safety byte since uint3korr() in
my_real_read() may actually read 4 bytes depending on build flags and
platform.
*/
if
(
!
(
buff
=
(
uchar
*
)
my_realloc
((
char
*
)
net
->
buff
,
(
uint32
)
pkt_length
+
NET_HEADER_SIZE
+
COMP_HEADER_SIZE
,
NET_HEADER_SIZE
+
COMP_HEADER_SIZE
+
1
,
MYF
(
MY_WME
))))
{
net
->
error
=
1
;
...
...
@@ -919,6 +921,13 @@ my_real_read(NET *net, ulong *complen)
#ifdef HAVE_COMPRESS
if
(
net
->
compress
)
{
/*
The following uint3korr() may read 4 bytes, so make sure we don't
read unallocated or uninitialized memory. The right-hand expression
must match the size of the buffer allocated in net_realloc().
*/
DBUG_ASSERT
(
net
->
where_b
+
NET_HEADER_SIZE
+
sizeof
(
uint32
)
<=
net
->
max_packet
+
NET_HEADER_SIZE
+
COMP_HEADER_SIZE
+
1
);
/*
If the packet is compressed then complen > 0 and contains the
number of bytes in the uncompressed packet
...
...
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