projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce2d1b8
)
Buffer overflow bug fixe in silc_log_format.
author
Pekka Riikonen
<priikone@silcnet.org>
Mon, 17 Jul 2000 16:44:57 +0000
(16:44 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Mon, 17 Jul 2000 16:44:57 +0000
(16:44 +0000)
lib/silccore/silclog.c
patch
|
blob
|
history
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$
+ * 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.
*
@@
-60,10
+63,11
@@
unsigned int log_fatal_size;
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);
- vs
printf(buf
, fmt, args);
+ vs
nprintf(buf, sizeof(buf) - 1
, fmt, args);
va_end(args);
return strdup(buf);