bugMibble MIB Parser - Bugs: bug #16252, Index out of bounds exception when...


bug #16252: Index out of bounds exception when printing some errors

Submitted by:  Per Cederberg <cederberg>
Submitted on:  Sun 02 Apr 2006 09:35:02 PM UTC  
Severity:  2 - Normal Item Group:  Software
Status:  Fixed Privacy:  Public
Assigned to:  Per Cederberg <cederberg> Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 28 May 2006 09:09:25 PM UTC, comment #3:

Version 2.7 has now been released. Closing this bug.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Sat 08 Apr 2006 03:03:21 PM UTC, comment #2:

A proper fix has now been committed whereby context lines are read only counting the LF 0x0A character as newline. This means the MibLoaderLog will always print the correct context line even though the line terminations may be weird.

This fix will be available in 2.7.alpha1.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Sun 02 Apr 2006 09:40:03 PM UTC, comment #1:

The quick and dirty fix is to patch the MibLoaderLog class to avoid printing the faltering line if the correct one couldn't be located. Just to avoid an exception when printing out the error message.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Sun 02 Apr 2006 09:35:02 PM UTC, original submission:

If a MIB file contains a mix of CR and CRLF line terminators, the MibLoaderLog class becomes confused and cannot find the erroneous line. The following stack trace occurs:

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:444)
at net.percederberg.mibble.MibLoaderLog.printTo(MibLoaderLog.java:267)
at net.percederberg.mibble.MibLoaderLog.printTo(MibLoaderLog.java:222)
at net.percederberg.mibble.MibLoaderLog.printTo(MibLoaderLog.java:213)

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #1469:  mib-loader-log-index-fix.patch added by cederberg (650B - application/octet-stream - mib-loader-log-index-fix.patch)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-28 cederberg Open/ClosedOpen => Closed
2006-04-08 cederberg StatusNone => Fixed
2006-04-02 cederberg Attached File- => Added mib-loader-log-index-fix.patch, #3533

Back to the top

Powered by Savane 3.4