projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3daec0c
)
Fixed the log-prefix buffer - it was too small and the setup code lacked
author
Sebastian Hammer
<quinn@indexdata.com>
Wed, 6 Dec 1995 09:51:27 +0000
(09:51 +0000)
committer
Sebastian Hammer
<quinn@indexdata.com>
Wed, 6 Dec 1995 09:51:27 +0000
(09:51 +0000)
a bounds-check.
util/log.c
patch
|
blob
|
history
diff --git
a/util/log.c
b/util/log.c
index
134d7fd
..
8102d2b
100644
(file)
--- a/
util/log.c
+++ b/
util/log.c
@@
-4,7
+4,11
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: log.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: log.c,v $
- * Revision 1.9 1995-09-29 17:12:34 quinn
+ * Revision 1.10 1995-12-06 09:51:27 quinn
+ * Fixed the log-prefix buffer - it was too small and the setup code lacked
+ * a bounds-check.
+ *
+ * Revision 1.9 1995/09/29 17:12:34 quinn
* Smallish
*
* Revision 1.8 1995/09/27 15:03:02 quinn
* Smallish
*
* Revision 1.8 1995/09/27 15:03:02 quinn
@@
-71,7
+75,7
@@
static int l_level = LOG_DEFAULT_LEVEL;
static FILE *l_file = stderr;
static int l_level = LOG_DEFAULT_LEVEL;
static FILE *l_file = stderr;
-static char l_prefix[30] = "log";
+static char l_prefix[512] = "log";
static struct {
int mask;
static struct {
int mask;
@@
-107,7
+111,7
@@
void log_init(int level, const char *prefix, const char *name)
{
l_level = level;
if (prefix && *prefix)
{
l_level = level;
if (prefix && *prefix)
- strcpy(l_prefix, prefix);
+ sprintf(l_prefix, "%.512s", prefix);
if (!name || !*name || l_file != stderr)
return;
if (!(l_file = fopen(name, "a")))
if (!name || !*name || l_file != stderr)
return;
if (!(l_file = fopen(name, "a")))