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
77b8a94d
Commit
77b8a94d
authored
Jan 17, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the code to look safe, not only be safe
parent
3c45559d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ndb/src/common/util/strdup.c
ndb/src/common/util/strdup.c
+2
-2
sql/log.cc
sql/log.cc
+2
-2
No files found.
ndb/src/common/util/strdup.c
View file @
77b8a94d
...
...
@@ -21,8 +21,8 @@
char
*
strdup
(
const
char
*
s
){
void
*
p2
;
p2
=
malloc
(
strlen
(
s
)
+
1
);
strcpy
(
p2
,
s
);
if
((
p2
=
malloc
(
strlen
(
s
)
+
1
)))
strcpy
(
p2
,
s
);
return
p2
;
}
#endif
sql/log.cc
View file @
77b8a94d
...
...
@@ -2247,9 +2247,9 @@ void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
DBUG_ENTER
(
"print_buffer_to_nt_eventlog"
);
buffptr
=
buff
;
if
(
length
>
(
uint
)(
buffLen
-
4
))
if
(
length
>
(
uint
)(
buffLen
-
5
))
{
char
*
newBuff
=
new
char
[
length
+
4
];
char
*
newBuff
=
new
char
[
length
+
5
];
strcpy
(
newBuff
,
buff
);
buffptr
=
newBuff
;
}
...
...
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