Re-fix ITS#6764 (check for ber == NULL _before_ using ber)

This commit is contained in:
Hallvard Furuseth 2011-01-05 13:57:31 +00:00
parent f46e339634
commit 360066784c

View file

@ -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 );