--- libraries/liblber/stdio.c 2002/09/09 22:47:48 1.1 +++ libraries/liblber/stdio.c 2002/11/27 03:13:19 1.2 @@ -1,4 +1,4 @@ -/* $OpenLDAP: pkg/ldap/libraries/liblutil/stdio.c,v 1.2 2002/09/06 18:54:23 hyc Exp $ */ +/* $OpenLDAP: pkg/ldap/libraries/liblber/stdio.c,v 1.1 2002/09/09 22:47:48 hyc Exp $ */ /* * Copyright 2002 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -55,6 +55,9 @@ int ber_pvt_vsnprintf( char *str, size_t fclose( f ); signal( SIGPIPE, sig ); + if ( res > 0 && res < n ) { + res = vsprintf( str, fmt, ap ); + } return res; } #endif