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
5454e5f9
Commit
5454e5f9
authored
Apr 28, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memory overflow in replace.c fixed
parent
8837e8f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
extra/replace.c
extra/replace.c
+2
-1
No files found.
extra/replace.c
View file @
5454e5f9
...
@@ -279,6 +279,8 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
...
@@ -279,6 +279,8 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
length
=
(
uint
)
strlen
(
name
)
+
1
;
length
=
(
uint
)
strlen
(
name
)
+
1
;
if
(
pa
->
length
+
length
>=
pa
->
max_length
)
if
(
pa
->
length
+
length
>=
pa
->
max_length
)
{
{
pa
->
max_length
=
(
pa
->
length
+
length
+
MALLOC_OVERHEAD
+
PS_MALLOC
-
1
)
/
PS_MALLOC
;
pa
->
max_length
=
pa
->
max_length
*
PS_MALLOC
-
MALLOC_OVERHEAD
;
if
(
!
(
new_pos
=
(
byte
*
)
my_realloc
((
gptr
)
pa
->
str
,
if
(
!
(
new_pos
=
(
byte
*
)
my_realloc
((
gptr
)
pa
->
str
,
(
uint
)
(
pa
->
max_length
+
PS_MALLOC
),
(
uint
)
(
pa
->
max_length
+
PS_MALLOC
),
MYF
(
MY_WME
))))
MYF
(
MY_WME
))))
...
@@ -291,7 +293,6 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
...
@@ -291,7 +293,6 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
char
*
);
char
*
);
pa
->
str
=
new_pos
;
pa
->
str
=
new_pos
;
}
}
pa
->
max_length
+=
PS_MALLOC
;
}
}
if
(
pa
->
typelib
.
count
>=
pa
->
max_count
-
1
)
if
(
pa
->
typelib
.
count
>=
pa
->
max_count
-
1
)
{
{
...
...
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