Threads stuck attempting to index Excel attachments due to bug in POI

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 2.9
    • Affects Version/s: 2.2.10
    • Component/s: None

      The following code was found in SSTDeserializer within POI:

      static public void addToStringTable( BinaryTree strings, Integer integer, UnicodeString string )
      {
      
      	if ( string.isRichText() )
      		string.setOptionFlags( (byte) ( string.getOptionFlags() & ( ~8 ) ) );
      	if ( string.isExtendedText() )
      		string.setOptionFlags( (byte) ( string.getOptionFlags() & ( ~4 ) ) );
      
      	boolean added = false;
      	while ( added == false )
      	{
      		try
      		{
      			strings.put( integer, string );
      			added = true;
      		}
      		catch ( Exception ignore )
      		{
      			string.setString( string.getString() + " " );
      		}
      	}
      
      }
      

      We upgrade POI to version 3.0.2 for Confluence 2.9 which is thankfully free of this code which has the potential to become stuck in an semi-infinite (until it OOMs) loop.

              Assignee:
              Unassigned
              Reporter:
              Andrew Lynch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: