projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Buffer overflow bug fixe in silc_log_format.
[silc.git]
/
lib
/
silccore
/
silclog.c
diff --git
a/lib/silccore/silclog.c
b/lib/silccore/silclog.c
index aecd6bf50c5b55e0d30d6315fc91bfa30a730879..0b1119fc445c53b49a38bc429081634799f7a1b3 100644
(file)
--- a/
lib/silccore/silclog.c
+++ b/
lib/silccore/silclog.c
@@
-20,6
+20,9
@@
/*
* $Id$
* $Log$
/*
* $Id$
* $Log$
+ * Revision 1.4 2000/07/17 16:44:57 priikone
+ * Buffer overflow bug fixe in silc_log_format.
+ *
* Revision 1.3 2000/07/05 06:06:35 priikone
* Global cosmetic change.
*
* Revision 1.3 2000/07/05 06:06:35 priikone
* Global cosmetic change.
*
@@
-60,10
+63,11
@@
unsigned int log_fatal_size;
char *silc_log_format(char *fmt, ...)
{
va_list args;
char *silc_log_format(char *fmt, ...)
{
va_list args;
- static char buf[
1024
];
+ static char buf[
8192
];
+ memset(buf, 0, sizeof(buf);
va_start(args, fmt);
va_start(args, fmt);
- vs
printf(buf
, fmt, args);
+ vs
nprintf(buf, sizeof(buf) - 1
, fmt, args);
va_end(args);
return strdup(buf);
va_end(args);
return strdup(buf);