Fix a bug in the MakeLDIF tool in which it is possible to attempt to access a
slot beyond the end of the last name array when processing gets to the point at
which it reaches the end of the first and last name lists simultaneously. In
that case, the first name counter was being reset but the last name counter was
not.
OpenDS Issue Number: 1482
| | |
| | | { |
| | | int msgID = MSGID_MAKELDIF_ERROR_WRITING_LDIF; |
| | | String message = getMessage(msgID, ldifFile.getValue(), |
| | | String.valueOf(e)); |
| | | stackTraceToSingleLineString(e)); |
| | | System.err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return 1; |
| | | } |
| | |
| | | { |
| | | int msgID = MSGID_MAKELDIF_CANNOT_WRITE_ENTRY; |
| | | String message = getMessage(msgID, String.valueOf(entry.getDN()), |
| | | String.valueOf(e)); |
| | | stackTraceToSingleLineString(e)); |
| | | throw new MakeLDIFException(msgID, message, e); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (lastNameIndex >= lastNames.length) |
| | | |
| | | if (lastNameIndex >= lastNames.length) |
| | | { |
| | | // We're at the end of the last name list, so start over. If the last |
| | | // name list is larger than the first name list, then we'll also need to |