v4.1, Coding error in LDAPSchemaElement.java, line 427

NEW
Assigned to

Status

Directory
LDAP Java SDK
P3
normal
18 years ago
14 years ago

People

(Reporter: Joe Schneider, Assigned: Erhyuan Tsai)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
ldapjdk.jar 4.1
LDAPSchemaElement.java, function  parseValue( String raw ), line 407

Siemens DirX LDAP-directory delivers MUST and MAY attribute lists WITHOUT 
whitespaces i.e "MAY (1.2.3.4 $ 2.3.4.5)".

I think there is a coding error in line 407 (LDAPSchemaElement.java). Last 
character of last attributetype will be cut off --> "2.3.4." instead 
of "2.3.4.5"
(Reporter)

Comment 1

18 years ago
Proposed fix beginning with line 427:
------------------------------
                    
                    // Nov-10-00: Joe Schneider, Terrasoft Software GmbH
                    // joes@terrasoft.de
                    // OLD: val = new String( ch, ind, last-ind-1 );
                    while ( ch[--last] == ' ' );
                    val = new String( ch, ind, last-ind + 1 );

------------------------------
Summary: v4.1, Coding error in LDAPSchemaElement.java, line 407 → v4.1, Coding error in LDAPSchemaElement.java, line 427

Comment 2

18 years ago
Thanks for the report and proposed fix.  Reassigning to Miodrag (Java LDAP SDK
lead).
Assignee: mcs → miodrag
(Reporter)

Comment 3

18 years ago
Correction to proposal:

                    // Nov-10-00: Joe Schneider, Terrasoft Software GmbH
                    // joes@terrasoft.de
                    // OLD: val = new String( ch, ind, last-ind-1 );
                    int lastchar=last;
                    while ( ch[--lastchar] == ' ' );
                    val = new String( ch, ind, lastchar-ind+1 );

Comment 4

18 years ago
Changed status to assigned
Status: NEW → ASSIGNED

Comment 5

14 years ago
Reassign LDAP JDK bugs owned by Miodrag (miodrag@formerly-netscape.com.tld) to
E-Y (erhyuan@pacbell.net)
Assignee: miodrag → erhyuan
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.