Skip to content

Commit

Permalink
Bug 66425: Avoid exceptions found via poi-fuzz
Browse files Browse the repository at this point in the history
Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/42537720

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923061 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Jan 11, 2025
1 parent 76617e9 commit 6befe2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ public static String getBulletText( NumberingState numberingState,
}
}

// ensure the format does not grow too large, number-format
// can be roman-numbers, where very large numbers would have
// very many "M" and thus may cause memory to overload
IOUtils.safelyAllocateCheck(num, MAX_BULLET_BUFFER_SIZE/10);

bulletBuffer.append( NumberFormatter.getNumber( num,
list.getNumberFormat( level ) ) );
} else {
Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit 6befe2a

Please sign in to comment.