goto decoding_error;
}
- lutil_uuidstr_from_normalized(
+ rc = lutil_uuidstr_from_normalized(
bv.bv_val, bv.bv_len,
uuidbuf, sizeof( uuidbuf ) );
- ber_str2bv( uuidbuf, 36, 1, uuid );
+ if ( rc == -1 ) {
+ goto decoding_error;
+ }
+ ber_str2bv( uuidbuf, rc, 1, uuid );
+ rc = LDAP_SUCCESS;
} else {
tag = ber_skip_tag( ber, &len );
normalized->bv_len, new->bv_val, new->bv_len + 1 );
done:;
- if ( rc != 0 ) {
+ if ( rc == -1 ) {
if ( new != NULL ) {
if ( new->bv_val != NULL ) {
slap_sl_free( new->bv_val, ctx );
}
}
new = NULL;
+
+ } else {
+ new->bv_len = rc;
}
return new;