mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
fix control value generation (ITS#6652)
This commit is contained in:
parent
0a12ea91df
commit
7c77d9b801
1 changed files with 3 additions and 19 deletions
|
|
@ -1173,25 +1173,9 @@ accesslog_ctrls(
|
|||
ber_len_t j;
|
||||
|
||||
ptr = lutil_strcopy( ptr, " controlValue \"" );
|
||||
for ( j = 0; j < ctrls[ i ]->ldctl_value.bv_len; j++ )
|
||||
{
|
||||
unsigned char o;
|
||||
|
||||
o = ( ( ctrls[ i ]->ldctl_value.bv_val[ j ] >> 4 ) & 0xF );
|
||||
if ( o < 10 ) {
|
||||
*ptr++ = '0' + o;
|
||||
|
||||
} else {
|
||||
*ptr++ = 'A' + o;
|
||||
}
|
||||
|
||||
o = ( ctrls[ i ]->ldctl_value.bv_val[ j ] & 0xF );
|
||||
if ( o < 10 ) {
|
||||
*ptr++ = '0' + o;
|
||||
|
||||
} else {
|
||||
*ptr++ = 'A' + o;
|
||||
}
|
||||
for ( j = 0; j < ctrls[ i ]->ldctl_value.bv_len; j++ ) {
|
||||
*ptr++ = SLAP_ESCAPE_HI(ctrls[ i ]->ldctl_value.bv_val[ j ]);
|
||||
*ptr++ = SLAP_ESCAPE_LO(ctrls[ i ]->ldctl_value.bv_val[ j ]);
|
||||
}
|
||||
|
||||
*ptr++ = '"';
|
||||
|
|
|
|||
Loading…
Reference in a new issue