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

 
 

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

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

Add a New Comment Rich Markup
   

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

Version 2.7 has now been released. Closing this bug.

Per Cederberg <cederberg>
Group administrator
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>
Group administrator
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>
Group administrator
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>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

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

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

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.13-54b4.
Corresponding source code