Diff for /servers/slapd/filter.c between versions 1.13.4.4 and 1.13.4.5

version 1.13.4.4, 2000/07/04 17:58:55 version 1.13.4.5, 2000/08/30 22:52:56
Line 1 Line 1
 /* filter.c - routines for parsing and dealing with filters */  /* filter.c - routines for parsing and dealing with filters */
 /* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.13.4.3 2000/06/13 17:57:28 kurt Exp $ */  /* $OpenLDAP$ */
 /*  /*
  * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.   * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
Line 699  int filter_escape_value( Line 699  int filter_escape_value(
         out->bv_val = (char *) ch_malloc( ( in->bv_len * 3 ) + 1 );          out->bv_val = (char *) ch_malloc( ( in->bv_len * 3 ) + 1 );
         out->bv_len = 0;          out->bv_len = 0;
   
 #undef NIBBLE  
 #undef ESCAPE_LO  
 #undef ESCAPE_HI  
 #define NIBBLE(c) ((c)&0x0f)  
 #define ESCAPE_LO(c) ( NIBBLE(c) + ( NIBBLE(c) < 10 ? '0' : 'A' - 10 ) )  
 #define ESCAPE_HI(c) ( ESCAPE_LO((c)>>4) )  
   
         for( i=0; i < in->bv_len ; i++ ) {          for( i=0; i < in->bv_len ; i++ ) {
                 if( FILTER_ESCAPE(in->bv_val[i]) ) {                  if( FILTER_ESCAPE(in->bv_val[i]) ) {
                         out->bv_val[out->bv_len++] = '\\';                          out->bv_val[out->bv_len++] = SLAP_ESCAPE_CHAR;
                         out->bv_val[out->bv_len++] = ESCAPE_HI( in->bv_val[i] );                          out->bv_val[out->bv_len++] = SLAP_ESCAPE_HI( in->bv_val[i] );
                         out->bv_val[out->bv_len++] = ESCAPE_LO( in->bv_val[i] );                          out->bv_val[out->bv_len++] = SLAP_ESCAPE_LO( in->bv_val[i] );
                 } else {                  } else {
                         out->bv_val[out->bv_len++] = in->bv_val[i];                          out->bv_val[out->bv_len++] = in->bv_val[i];
                 }                  }
Line 719  int filter_escape_value( Line 712  int filter_escape_value(
         out->bv_val[out->bv_len] = '\0';          out->bv_val[out->bv_len] = '\0';
         return LDAP_SUCCESS;          return LDAP_SUCCESS;
 }  }
   
   

Removed from v.1.13.4.4  
changed lines
  Added in v.1.13.4.5


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org