Issue 605 - fixes for IA5StringNormalize() and NumericStringNormalize()
Summary: fixes for IA5StringNormalize() and NumericStringNormalize()
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-27 09:06 UTC by christian.lorenz@suse.de
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description christian.lorenz@suse.de 2000-06-27 09:06:38 UTC
Full_Name: Christian Lorenz
Version: 2.0-devel
OS: linux-2.2.14
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.243.113.230)


Here's a patch against "schema_init.c,v 1.42": the while-statements
are already fixed in the current version (1.56), but the if-statements
are still faulty.

Have fun!

pkg/ldap/servers/slapd/schema_init.c,v 1.42
===========================================
--- ldap/servers/slapd/schema_init.c.orig   Tue Jun 27 10:46:16 2000
+++ ldap/servers/slapd/schema_init.c    Tue Jun 27 10:49:03 2000
@@ -453,11 +453,12 @@
    p = val->bv_val;

    /* Ignore initial whitespace */
-   while ( isspace( *p++ ) ) {
-       /* EMPTY */  ;
+
+   while ( isspace( *p ) ) {
+       p++;
    }

-   if( *p != '\0' ) {
+   if( *p == '\0' ) {
        ch_free( newval );
        return LDAP_INVALID_SYNTAX;
    }
@@ -900,11 +901,11 @@
    p = val->bv_val;

    /* Ignore initial whitespace */
-   while ( isspace( *p++ ) ) {
-       /* EMPTY */  ;
+   while ( isspace( *p ) ) {
+       p++;
    }

-   if( *p != '\0' ) {
+   if( *p == '\0' ) {
        ch_free( newval );
        return LDAP_INVALID_SYNTAX;
    }

Comment 1 Kurt Zeilenga 2000-06-29 01:15:04 UTC
I believe fixes where committed in r1.57 or schema_init.c.
If not, complain some more (with an updated patch).

Kurt

At 09:06 AM 6/27/00 GMT, christian.lorenz@suse.de wrote:
>Full_Name: Christian Lorenz
>Version: 2.0-devel
>OS: linux-2.2.14
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (195.243.113.230)
>
>
>Here's a patch against "schema_init.c,v 1.42": the while-statements
>are already fixed in the current version (1.56), but the if-statements
>are still faulty.
>
>Have fun!
>
>pkg/ldap/servers/slapd/schema_init.c,v 1.42
>===========================================
>--- ldap/servers/slapd/schema_init.c.orig   Tue Jun 27 10:46:16 2000
>+++ ldap/servers/slapd/schema_init.c    Tue Jun 27 10:49:03 2000
>@@ -453,11 +453,12 @@
>    p = val->bv_val;
>
>    /* Ignore initial whitespace */
>-   while ( isspace( *p++ ) ) {
>-       /* EMPTY */  ;
>+
>+   while ( isspace( *p ) ) {
>+       p++;
>    }
>
>-   if( *p != '\0' ) {
>+   if( *p == '\0' ) {
>        ch_free( newval );
>        return LDAP_INVALID_SYNTAX;
>    }
>@@ -900,11 +901,11 @@
>    p = val->bv_val;
>
>    /* Ignore initial whitespace */
>-   while ( isspace( *p++ ) ) {
>-       /* EMPTY */  ;
>+   while ( isspace( *p ) ) {
>+       p++;
>    }
>
>-   if( *p != '\0' ) {
>+   if( *p == '\0' ) {
>        ch_free( newval );
>        return LDAP_INVALID_SYNTAX;
>    }
>
>
>
>
Comment 2 Kurt Zeilenga 2000-06-30 10:10:26 UTC
moved from Incoming to Development
Comment 3 Kurt Zeilenga 2000-06-30 10:13:39 UTC
changed notes
Comment 4 Kurt Zeilenga 2000-06-30 10:14:27 UTC
changed state Open to Closed
Comment 5 OpenLDAP project 2014-08-01 21:05:27 UTC
fixed