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
83ef8c58
Commit
83ef8c58
authored
Jan 17, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the code to look safe, not only be safe
parent
fa38a0d1
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 @
83ef8c58
...
...
@@ -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 @
83ef8c58
...
...
@@ -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