Commit 06806c27 authored by Sunil Kumar's avatar Sunil Kumar
Browse files

Field is read after checking the array bounds.

parent 1cc4460e
...@@ -612,12 +612,12 @@ public class LDIFReader implements LDAPReader { ...@@ -612,12 +612,12 @@ public class LDIFReader implements LDAPReader {
} }
fieldIndex++; // reference newsuperior field fieldIndex++; // reference newsuperior field
currentField = (StringBuffer)this.rFields.get(fieldIndex);
if (fieldIndex == this.fNumber) { // no newsuperior spefified if (fieldIndex == this.fNumber) { // no newsuperior spefified
this.modInfo[2] = new String(""); this.modInfo[2] = new String("");
} }
else { // there is a newsuperior else { // there is a newsuperior
currentField = (StringBuffer)this.rFields.get(fieldIndex);
index = 12; // length of "newsuperior:" index = 12; // length of "newsuperior:"
if( ! currentField.substring(0, index).equalsIgnoreCase( if( ! currentField.substring(0, index).equalsIgnoreCase(
"newsuperior:")) { "newsuperior:")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment