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
7b58a93a
Commit
7b58a93a
authored
Dec 05, 2002
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql into serg.mysql.com:/usr/home/serg/Abk/mysql
parents
82a96692
eb37c17d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
libmysql/libmysql.c
libmysql/libmysql.c
+9
-2
No files found.
libmysql/libmysql.c
View file @
7b58a93a
...
...
@@ -939,7 +939,7 @@ static MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
else
{
cur
->
data
[
field
]
=
to
;
if
(
to
+
len
>
end_
to
)
if
(
len
>
end_to
-
to
)
{
free_rows
(
result
);
net
->
last_errno
=
CR_UNKNOWN_ERROR
;
...
...
@@ -980,7 +980,7 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
{
uint
field
;
ulong
pkt_len
,
len
;
uchar
*
pos
,
*
prev_pos
;
uchar
*
pos
,
*
prev_pos
,
*
end_pos
;
if
((
pkt_len
=
(
uint
)
net_safe_read
(
mysql
))
==
packet_error
)
return
-
1
;
...
...
@@ -988,6 +988,7 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
return
1
;
/* End of data */
prev_pos
=
0
;
/* allowed to write at packet[-1] */
pos
=
mysql
->
net
.
read_pos
;
end_pos
=
pos
+
pkt_len
;
for
(
field
=
0
;
field
<
fields
;
field
++
)
{
if
((
len
=
(
ulong
)
net_field_length
(
&
pos
))
==
NULL_LENGTH
)
...
...
@@ -997,6 +998,12 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
}
else
{
if
(
len
>
end_pos
-
pos
)
{
mysql
->
net
.
last_errno
=
CR_UNKNOWN_ERROR
;
strmov
(
mysql
->
net
.
last_error
,
ER
(
mysql
->
net
.
last_errno
));
return
-
1
;
}
row
[
field
]
=
(
char
*
)
pos
;
pos
+=
len
;
*
lengths
++=
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