Declare enough buffer space for out-of-range URL port numbers

This commit is contained in:
Hallvard Furuseth 2007-12-15 23:36:22 +00:00
parent 13491b3905
commit e4ffd33f1a

View File

@ -582,7 +582,7 @@ desc2str_len( LDAPURLDesc *u )
len += sep;
if ( u->lud_port ) {
char buf[ STRLENOF(":65535") + 1 ];
char buf[LDAP_PVT_INTTYPE_CHARS(int) + 1];
len += snprintf( buf, sizeof( buf ), ":%d", u->lud_port );
if ( u->lud_host && u->lud_host[0] ) {