From: Pierangelo Masarati Date: Tue, 19 Jul 2005 21:56:15 +0000 (+0000) Subject: fix arbitrary precision number display when no big number library is available X-Git-Tag: OPENLDAP_AC_BP~316 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a27a32ccc4de7cd9bcf97ef55289dd762ba16d03;p=openldap fix arbitrary precision number display when no big number library is available --- 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 */