mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 15:49:34 -05:00
do not use lutil_atoix() (ITS#6654)
This commit is contained in:
parent
9d77d61314
commit
2b1b37cd4b
1 changed files with 9 additions and 1 deletions
|
|
@ -164,8 +164,16 @@ ldap_parse_ldif_record_x(
|
||||||
|
|
||||||
if ( dn == NULL ) {
|
if ( dn == NULL ) {
|
||||||
if ( linenum+i == 1 && BV_CASEMATCH( lr->lr_btype+i, &BV_VERSION )) {
|
if ( linenum+i == 1 && BV_CASEMATCH( lr->lr_btype+i, &BV_VERSION )) {
|
||||||
|
/* lutil_atoi() introduces a dependence of libldap
|
||||||
|
* on liblutil; we only allow version 1 by now (ITS#6654)
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
int v;
|
int v;
|
||||||
if( lr->lr_vals[i].bv_len == 0 || lutil_atoi( &v, lr->lr_vals[i].bv_val) != 0 || v != 1 ) {
|
if( lr->lr_vals[i].bv_len == 0 || lutil_atoi( &v, lr->lr_vals[i].bv_val) != 0 || v != 1 )
|
||||||
|
#endif
|
||||||
|
static const struct berval version1 = { 1, "1" };
|
||||||
|
if ( lr->lr_vals[i].bv_len != version1.bv_len || strncmp( lr->lr_vals[i].bv_val, version1.bv_val, version1.bv_len ) != 0 )
|
||||||
|
{
|
||||||
fprintf( stderr,
|
fprintf( stderr,
|
||||||
_("%s: invalid version %s, line %d (ignored)\n"),
|
_("%s: invalid version %s, line %d (ignored)\n"),
|
||||||
errstr, lr->lr_vals[i].bv_val, linenum );
|
errstr, lr->lr_vals[i].bv_val, linenum );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue