mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
revert prev commit to normalizers
This commit is contained in:
parent
559b746437
commit
70fda7725a
@ -1636,7 +1636,7 @@ telephoneNumberNormalize(
|
|||||||
/* validator should have refused an empty string */
|
/* validator should have refused an empty string */
|
||||||
assert( val->bv_len );
|
assert( val->bv_len );
|
||||||
|
|
||||||
q = normalized->bv_val = ch_malloc( val->bv_len + 1 );
|
q = normalized->bv_val = slap_sl_malloc( val->bv_len + 1, ctx );
|
||||||
|
|
||||||
for( p = val->bv_val; *p; p++ ) {
|
for( p = val->bv_val; *p; p++ ) {
|
||||||
if ( ! ( ASCII_SPACE( *p ) || *p == '-' )) {
|
if ( ! ( ASCII_SPACE( *p ) || *p == '-' )) {
|
||||||
@ -1977,7 +1977,7 @@ UUIDNormalize(
|
|||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
normalized->bv_len = 16;
|
normalized->bv_len = 16;
|
||||||
normalized->bv_val = ch_malloc( normalized->bv_len + 1 );
|
normalized->bv_val = slap_sl_malloc( normalized->bv_len + 1, ctx );
|
||||||
|
|
||||||
for( i=0, j=0; i<36; i++ ) {
|
for( i=0, j=0; i<36; i++ ) {
|
||||||
unsigned char nibble;
|
unsigned char nibble;
|
||||||
@ -2045,7 +2045,7 @@ numericStringNormalize(
|
|||||||
|
|
||||||
assert( val->bv_len );
|
assert( val->bv_len );
|
||||||
|
|
||||||
normalized->bv_val = ch_malloc( val->bv_len + 1 );
|
normalized->bv_val = slap_sl_malloc( val->bv_len + 1, ctx );
|
||||||
|
|
||||||
p = val->bv_val;
|
p = val->bv_val;
|
||||||
q = normalized->bv_val;
|
q = normalized->bv_val;
|
||||||
@ -2672,7 +2672,7 @@ generalizedTimeNormalize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = sizeof("YYYYmmddHHMMSSZ")-1 + fraction.bv_len;
|
len = sizeof("YYYYmmddHHMMSSZ")-1 + fraction.bv_len;
|
||||||
normalized->bv_val = ch_malloc( len + 1 );
|
normalized->bv_val = slap_sl_malloc( len + 1, ctx );
|
||||||
if ( normalized->bv_val == NULL ) {
|
if ( normalized->bv_val == NULL ) {
|
||||||
return LBER_ERROR_MEMORY;
|
return LBER_ERROR_MEMORY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user