X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Flog.c;h=8102d2b50e8d43a05b78c40c328cf59cc46a753e;hb=b2d4fae21009b1909a35ef9ae6bcd27c1a5dca74;hp=ea026f8707bb00c5c8640aca3423ddd324602897;hpb=76cc232b7a7313f292e2fa28a2ea12eaab865353;p=yaz-moved-to-github.git diff --git a/util/log.c b/util/log.c index ea026f8..8102d2b 100644 --- a/util/log.c +++ b/util/log.c @@ -4,7 +4,17 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: log.c,v $ - * Revision 1.7 1995-06-19 12:40:18 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 + * Modified function heads & prototypes. + * + * Revision 1.7 1995/06/19 12:40:18 quinn * Added log_file() * * Revision 1.6 1995/06/15 15:45:03 quinn @@ -65,7 +75,7 @@ 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; @@ -101,7 +111,7 @@ void log_init(int level, const char *prefix, const char *name) { 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")))