You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2023/07/20 23:29:55 UTC
[GitHub] [commons-imaging] garydgregory commented on a diff in pull request #304: Make checkForSubImage null-safe
garydgregory commented on code in PR #304:
URL: https://github.com/apache/commons-imaging/pull/304#discussion_r1270096441
##########
src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java:
##########
@@ -75,7 +75,7 @@ private Rectangle checkForSubImage(
// dimensions of the image that is being read. This method
// returns the sub-image specification, if any, and leaves
// further tests to the calling module.
- if (params.isSubImageSet()) {
+ if (params != null && params.isSubImageSet()) {
Review Comment:
The only thing missing here is a unit test that shows why this is a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org