From: Hallvard Furuseth Date: Thu, 6 Apr 2006 09:28:19 +0000 (+0000) Subject: Avoid sprintf buffer overrun if huge hostname X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a070e6c05ff054ea047defc78fe60ec2d67c4565;p=openldap Avoid sprintf buffer overrun if huge hostname --- diff --git a/servers/slurpd/st.c b/servers/slurpd/st.c index 595b99ea0f..d355ce68a5 100644 --- a/servers/slurpd/st.c +++ b/servers/slurpd/st.c @@ -246,10 +246,10 @@ St_read( } if ( found ) { char tbuf[ 255 ]; - sprintf( tbuf, "%s:%s (timestamp %s.%s)", hostname, port, - timestamp, seq ); + sprintf( tbuf, "%s.%s", timestamp, seq ); Debug( LDAP_DEBUG_ARGS, - "Retrieved state information for %s\n", tbuf, 0, 0 ); + "Retrieved state information for %s:%s (timestamp %s)\n", + hostname, port, tbuf ); } else { Debug( LDAP_DEBUG_ANY, "Warning: saved state for %s:%s, not a known replica\n",