mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-27 01:02:53 -05:00
Catch ber_scanf errors properly
This commit is contained in:
parent
dd640af54f
commit
6223282235
2 changed files with 3 additions and 4 deletions
|
|
@ -1526,8 +1526,8 @@ connection_input( Connection *conn , conn_readinfo *cri )
|
|||
#ifdef LDAP_CONNECTIONLESS
|
||||
if( conn->c_is_udp ) {
|
||||
if( tag == LBER_OCTETSTRING ) {
|
||||
ber_get_stringa( ber, &cdn );
|
||||
tag = ber_peek_tag(ber, &len);
|
||||
if ( (tag = ber_get_stringa( ber, &cdn )) != LBER_ERROR )
|
||||
tag = ber_peek_tag( ber, &len );
|
||||
}
|
||||
if( tag != LDAP_REQ_ABANDON && tag != LDAP_REQ_SEARCH ) {
|
||||
Debug( LDAP_DEBUG_ANY, "invalid req for UDP 0x%lx\n", tag, 0, 0 );
|
||||
|
|
|
|||
|
|
@ -402,8 +402,7 @@ get_ssa(
|
|||
{
|
||||
unsigned usage;
|
||||
|
||||
rc = ber_scanf( ber, "m", &value );
|
||||
if ( rc == LBER_ERROR ) {
|
||||
if ( ber_scanf( ber, "m", &value ) == LBER_ERROR ) {
|
||||
rc = SLAPD_DISCONNECT;
|
||||
goto return_error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue