Commit 36951ced authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#9391 remove asserts in UUIDNormalize()

parent 76df30a8
......@@ -2940,12 +2940,14 @@ UUIDNormalize(
if ( SLAP_MR_IS_DENORMALIZE( usage ) ) {
/* NOTE: must be a normalized UUID */
assert( val->bv_len == 16 );
if( val->bv_len != 16 )
return LDAP_INVALID_SYNTAX;
normalized->bv_val = slap_sl_malloc( LDAP_LUTIL_UUIDSTR_BUFSIZE, ctx );
normalized->bv_len = lutil_uuidstr_from_normalized( val->bv_val,
val->bv_len, normalized->bv_val, LDAP_LUTIL_UUIDSTR_BUFSIZE );
assert( normalized->bv_len == STRLENOF( "BADBADBA-DBAD-0123-4567-BADBADBADBAD" ) );
if( normalized->bv_len != STRLENOF( "BADBADBA-DBAD-0123-4567-BADBADBADBAD" ) )
return LDAP_INVALID_SYNTAX;
return LDAP_SUCCESS;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment