Skip to content

Commit

Permalink
fix: keep on processing after failing to read GIFs
Browse files Browse the repository at this point in the history
Reading some GIF images caused EPUBCheck to crash with a
`java.lang.ArrayIndexOutOfBoundsException`. See #756.

This change expands the catch block to any `RuntimeException` to at
least catch the problem and keep on processing.

Further work needs to be done to handle #756 properly, and do not
reject said GIFs as corrupted.
  • Loading branch information
rdeltour committed Jan 21, 2019
1 parent bea1601 commit 2a244e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public ImageHeuristics getImageSizes(String imgFileName) throws
report.message(MessageId.PKG_021, EPUBLocation.create(imgFileName));
return null;
}
catch (IllegalArgumentException argex)
catch (RuntimeException argex)
{
report.message(MessageId.PKG_021, EPUBLocation.create(imgFileName));
return null;
Expand Down

0 comments on commit 2a244e7

Please sign in to comment.