mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 19:19:35 -05:00
Re-fix ITS#6764 (check for ber == NULL _before_ using ber)
This commit is contained in:
parent
f46e339634
commit
360066784c
1 changed files with 4 additions and 5 deletions
|
|
@ -390,16 +390,15 @@ int ber_flatten2(
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* unmatched "{" and "}" */
|
||||
if ( ber->ber_sos_ptr != NULL ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( ber == NULL ) {
|
||||
/* ber is null, create an empty berval */
|
||||
bv->bv_val = NULL;
|
||||
bv->bv_len = 0;
|
||||
|
||||
} else if ( ber->ber_sos_ptr != NULL ) {
|
||||
/* unmatched "{" and "}" */
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
/* copy the berval */
|
||||
ber_len_t len = ber_pvt_ber_write( ber );
|
||||
|
|
|
|||
Loading…
Reference in a new issue