From a27a32ccc4de7cd9bcf97ef55289dd762ba16d03 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 19 Jul 2005 21:56:15 +0000 Subject: [PATCH] fix arbitrary precision number display when no big number library is available --- servers/slapd/proto-slap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index aa126e2ef8..c632c6145c 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -1681,11 +1681,11 @@ LDAP_SLAPD_F (int) fe_extended LDAP_P((Operation *op, SlapReply *rs)); do { \ char buf[] = "+9223372036854775807L"; \ ber_len_t len; \ - snprintf( buf, sizeof( buf ), UI2BV_FORMAT, (ui) ); \ - len = strlen( buf ); \ + len = snprintf( buf, sizeof( buf ), UI2BV_FORMAT, (ui) ); \ if ( len > (bv)->bv_len ) { \ (bv)->bv_val = ber_memrealloc_x( (bv)->bv_val, len + 1, (ctx) ); \ } \ + (bv)->bv_len = len; \ AC_MEMCPY( (bv)->bv_val, buf, len + 1 ); \ } while ( 0 ) #endif /* ! HAVE_GMP */ -- 2.39.5