mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Avoid sprintf buffer overrun if huge hostname
This commit is contained in:
parent
daec2febfb
commit
a070e6c05f
1 changed files with 3 additions and 3 deletions
|
|
@ -246,10 +246,10 @@ St_read(
|
||||||
}
|
}
|
||||||
if ( found ) {
|
if ( found ) {
|
||||||
char tbuf[ 255 ];
|
char tbuf[ 255 ];
|
||||||
sprintf( tbuf, "%s:%s (timestamp %s.%s)", hostname, port,
|
sprintf( tbuf, "%s.%s", timestamp, seq );
|
||||||
timestamp, seq );
|
|
||||||
Debug( LDAP_DEBUG_ARGS,
|
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 {
|
} else {
|
||||||
Debug( LDAP_DEBUG_ANY,
|
Debug( LDAP_DEBUG_ANY,
|
||||||
"Warning: saved state for %s:%s, not a known replica\n",
|
"Warning: saved state for %s:%s, not a known replica\n",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue