]> git.sur5r.net Git - openldap/commitdiff
Avoid sprintf buffer overrun if huge hostname
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 6 Apr 2006 09:28:19 +0000 (09:28 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 6 Apr 2006 09:28:19 +0000 (09:28 +0000)
servers/slurpd/st.c

index 595b99ea0f87cc5df9d935a458e55f50af8e2b88..d355ce68a554e0f1f8bafd994a29f8b8ed446e40 100644 (file)
@@ -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",