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
e96c75fe
Commit
e96c75fe
authored
Apr 03, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in memory allocation that could affect 64 bit systems (affected hammer)
parent
3cdc8ae5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
mysys/my_vsnprintf.c
mysys/my_vsnprintf.c
+8
-1
sql/ha_myisam.cc
sql/ha_myisam.cc
+1
-1
sql/log.cc
sql/log.cc
+1
-0
No files found.
mysys/my_vsnprintf.c
View file @
e96c75fe
...
...
@@ -21,13 +21,18 @@
#include <stdarg.h>
#include <m_ctype.h>
int
my_snprintf
(
char
*
to
,
size_t
n
,
const
char
*
fmt
,
...)
{
int
result
;
va_list
args
;
va_start
(
args
,
fmt
);
return
my_vsnprintf
(
to
,
n
,
fmt
,
args
);
result
=
my_vsnprintf
(
to
,
n
,
fmt
,
args
);
va_end
(
args
);
return
result
;
}
int
my_vsnprintf
(
char
*
to
,
size_t
n
,
const
char
*
fmt
,
va_list
ap
)
{
char
*
start
=
to
,
*
end
=
to
+
n
-
1
;
...
...
@@ -79,6 +84,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
return
(
uint
)
(
to
-
start
);
}
#ifdef MAIN
static
void
my_printf
(
const
char
*
fmt
,
...)
{
...
...
@@ -92,6 +98,7 @@ static void my_printf(const char * fmt, ...)
va_end
(
ar
);
}
int
main
()
{
...
...
sql/ha_myisam.cc
View file @
e96c75fe
...
...
@@ -953,7 +953,7 @@ int ha_myisam::create(const char *name, register TABLE *form,
&
keydef
,
form
->
keys
*
sizeof
(
MI_KEYDEF
),
&
keyseg
,
((
form
->
key_parts
+
form
->
keys
)
*
sizeof
(
MI_KEYSEG
)),
0
)))
NullS
)))
DBUG_RETURN
(
1
);
pos
=
form
->
key_info
;
...
...
sql/log.cc
View file @
e96c75fe
...
...
@@ -1067,6 +1067,7 @@ void sql_print_error(const char *format,...)
char
buff
[
1024
];
my_vsnprintf
(
buff
,
sizeof
(
buff
)
-
1
,
format
,
args
);
DBUG_PRINT
(
"error"
,(
"%s"
,
buff
));
va_end
(
args
);
va_start
(
args
,
format
);
}
#endif
...
...
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