]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/getfilter.c
Import latest leak fix from HEAD.
[openldap] / libraries / libldap / getfilter.c
index 2d8b89c8a8d68672e17d8bc39e2c817f556153f0..9939ae88acd1dad6017747ad281a1200d344b2ed 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <ac/stdlib.h>
 
-#include <ac/ctype.h>
 #include <ac/errno.h>
 #include <ac/regex.h>
 #include <ac/string.h>
@@ -347,12 +346,12 @@ ldap_build_filter(
            if ( *p == '%' ) {
                ++p;
                if ( *p == 'v' ) {
-                   if ( isdigit( (unsigned char) p[1] )) {
+                   if ( LDAP_DIGIT( (unsigned char) p[1] )) {
                        ++p;
                        wordnum = *p - '1';
                        if ( *(p+1) == '-' ) {
                            ++p;
-                           if ( isdigit( (unsigned char) p[1] )) {
+                           if ( LDAP_DIGIT( (unsigned char) p[1] )) {
                                ++p;
                                endwordnum = *p - '1';  /* e.g., "%v2-4" */
                                if ( endwordnum > wordcount - 1 ) {
@@ -371,7 +370,7 @@ ldap_build_filter(
                                    *f++ = ' ';
                                }
                                slen = strlen( valwords[ i ] );
-                               SAFEMEMCPY( f, valwords[ i ], slen );
+                               AC_MEMCPY( f, valwords[ i ], slen );
                                f += slen;
                            }
                        }
@@ -380,17 +379,17 @@ ldap_build_filter(
                        if ( wordcount > 0 ) {
                            wordnum = wordcount - 1;
                            slen = strlen( valwords[ wordnum ] );
-                           SAFEMEMCPY( f, valwords[ wordnum ], slen );
+                           AC_MEMCPY( f, valwords[ wordnum ], slen );
                            f += slen;
                        }
                    } else if ( value != NULL ) {
                        slen = strlen( value );
-                       SAFEMEMCPY( f, value, slen );
+                       AC_MEMCPY( f, value, slen );
                        f += slen;
                    }
                } else if ( *p == 'a' && attr != NULL ) {
                    slen = strlen( attr );
-                   SAFEMEMCPY( f, attr, slen );
+                   AC_MEMCPY( f, attr, slen );
                    f += slen;
                } else {
                    *f++ = *p;