X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblber%2Fdebug.c;h=cfec0942e4a3f8f1df78f95fb7d286e8c5ecf60d;hb=1702d408bfc09716ed0fbd42ef8c6bd11c51fd3a;hp=044b9795a3eaab5adf25e09eb64c95f0fc97dd84;hpb=f0b25d7b2c656a16532f006a13b0fd4b0e2dd757;p=openldap diff --git a/libraries/liblber/debug.c b/libraries/liblber/debug.c index 044b9795a3..cfec0942e4 100644 --- a/libraries/liblber/debug.c +++ b/libraries/liblber/debug.c @@ -30,7 +30,6 @@ struct DEBUGLEVEL }; int ldap_loglevels[LDAP_SUBSYS_NUM]; -static long numLevels = 0; static FILE *log_file = NULL; static int global_level = 0; @@ -167,6 +166,7 @@ void lutil_log_int( #ifdef HAVE_VSYSLOG vsyslog( debug2syslog(level), fmt, vl ); #else + char data[4096]; vsnprintf( data, sizeof(data), fmt, vl ); syslog( debug2syslog(level), data ); #endif @@ -310,11 +310,7 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... ) #endif va_start( vl, fmt ); -#ifdef HAVE_VSNPRINTF vsnprintf( buffer, sizeof(buffer), fmt, vl ); -#else - vsprintf( buffer, fmt, vl ); -#endif buffer[sizeof(buffer)-1] = '\0'; if( log_file != NULL ) {