diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-02-13 07:58:30 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-02-13 08:10:43 +0300 |
commit | 8ee6bfd26b9e90e07e530906f5a5d4b198db6ead (patch) | |
tree | 23a6f725f21b389d874b2a0fb66342e06f6b60a5 /contrib/libs/openldap/libraries/liblber/debug.c | |
parent | 9bb0e697690361fd000af1b1939ca4a688c812e0 (diff) | |
download | ydb-8ee6bfd26b9e90e07e530906f5a5d4b198db6ead.tar.gz |
Update contrib/libs/openldap to 2.6.7
Diffstat (limited to 'contrib/libs/openldap/libraries/liblber/debug.c')
-rw-r--r-- | contrib/libs/openldap/libraries/liblber/debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/libs/openldap/libraries/liblber/debug.c b/contrib/libs/openldap/libraries/liblber/debug.c index 1744e58a33..1f4fdbb61a 100644 --- a/contrib/libs/openldap/libraries/liblber/debug.c +++ b/contrib/libs/openldap/libraries/liblber/debug.c @@ -43,12 +43,15 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... ) { char buffer[4096]; va_list vl; + int len; if ( !(level & debug ) ) return; va_start( vl, fmt ); - vsnprintf( buffer, sizeof(buffer), fmt, vl ); + len = vsnprintf( buffer, sizeof(buffer), fmt, vl ); va_end( vl ); + if ( len >= sizeof(buffer)-2 ) + buffer[sizeof(buffer)-2] = '\n'; ber_pvt_log_print( buffer ); } |