Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8266435: WBMPImageReader.read() should not truncate the input stream #6518

Closed
wants to merge 1 commit into from

Conversation

jayathirthrao
Copy link
Member

@jayathirthrao jayathirthrao commented Nov 23, 2021

If we use a custom stream and specify limit on stream.read() length, WBMPImageReader.read() doesnt verify whether we are decoded complete data or not. We can check the length of data decoded and rerun the stream.read() or use readFully(). In case of other decoders like BMP we are using readFully(), so i have updated WBMPImageReader.read() to use readFully().


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266435: WBMPImageReader.read() should not truncate the input stream

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6518/head:pull/6518
$ git checkout pull/6518

Update a local copy of the PR:
$ git checkout pull/6518
$ git pull https://git.openjdk.java.net/jdk pull/6518/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6518

View PR using the GUI difftool:
$ git pr show -t 6518

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6518.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 23, 2021

👋 Welcome back jdv! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 23, 2021
@openjdk
Copy link

openjdk bot commented Nov 23, 2021

@jayathirthrao The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Nov 23, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 23, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Nov 24, 2021

@jayathirthrao This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8266435: WBMPImageReader.read() should not truncate the input stream

Reviewed-by: serb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 19 new commits pushed to the master branch:

  • 7b2d823: 8277503: compiler/onSpinWait/TestOnSpinWaitAArch64DefaultFlags.java failed with "OnSpinWaitInst with the expected value 'isb' not found."
  • 7cb56a2: 8265796: vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java fails when running with JEP 416
  • 24e586a: 8276764: Enable deterministic file content ordering for Jar and Jmod
  • ea85e01: 8271623: Omit enclosing instance fields from inner classes that don't use it
  • 0320672: 8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE
  • e8acac2: 8277350: runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java times out
  • 8a44e09: 8268725: jshell does not support the --enable-native-access option
  • 7b67a49: 8261847: performance of java.lang.Record::toString should be improved
  • 38802ad: 8254108: ciReplay: Support incremental inlining
  • 64bdc84: 8277649: [BACKOUT] JDK-8277507 Add jlink.debug system property while launching jpackage tests to help diagonize recent intermittent failures
  • ... and 9 more: https://git.openjdk.java.net/jdk/compare/bb11c55dff86706a010c93ee2cc60c87bb2d53b6...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 24, 2021
@jayathirthrao
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 2, 2021

Going to push as commit 8198807.
Since your change was applied there have been 114 commits pushed to the master branch:

  • b226ab9: 8276141: XPathFactory set/getProperty method
  • 09522db: 8277647: [REDO] JDK-8277507 Add jlink.debug system property while launching jpackage tests to help diagonize recent intermittent failures
  • 67745fa: 8276299: G1: Unify the wording buffer/node/element in G1SegmentedArrayXxx, G1CardSetXxx and related classes
  • 51d6d7a: 8266839: Enable pandoc on macosx-aarch64 at Oracle
  • 0dfb3a7: 8268582: javadoc throws NPE with --ignore-source-errors option
  • f41e768: 8277762: Allow configuration of HOTSPOT_BUILD_USER
  • a363b7b: 8177819: DateTimeFormatterBuilder zone parsing should recognise DST
  • 9b3e672: 8278014: [vectorapi] Remove test run script
  • 1e9ed54: 8193682: Infinite loop in ZipOutputStream.close()
  • abaa073: 8277946: NMT: Deprecate and remove VM.native_memory shutdown jcmd command option
  • ... and 104 more: https://git.openjdk.java.net/jdk/compare/bb11c55dff86706a010c93ee2cc60c87bb2d53b6...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Dec 2, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 2, 2021
@openjdk
Copy link

openjdk bot commented Dec 2, 2021

@jayathirthrao Pushed as commit 8198807.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jayathirthrao jayathirthrao deleted the JDK-8266435_WBMP branch December 2, 2021 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
2 participants