Skip to content
Snippets Groups Projects
Commit a070e6c0 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Avoid sprintf buffer overrun if huge hostname

parent daec2feb
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment