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/379574870

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923059 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Jan 11, 2025
1 parent edcbd87 commit 57afb34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ private static String replaceTextCap(TextRun tr) {
// PowerPoint seems to store files with \r as the line break
// The messes things up on everything but a Mac, so translate them to \n
String txt = tr.getRawText();
if (txt == null) {
return "";
}

txt = txt.replace('\r', '\n');
txt = txt.replace((char) 0x0B, sep);

Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit 57afb34

Please sign in to comment.