mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
Catch ber_scanf errors properly
This commit is contained in:
parent
dd640af54f
commit
6223282235
@ -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 New Issue
Block a user