diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index d84c1907cd..e2288fbf98 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -390,6 +390,11 @@ 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;