[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 8266435: WBMPImageReader.read() should not truncate the input stream
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2021-11-25 4:00:02
Message-ID: icd3sXDFOf8TQx78hDgO9wULkZ0ah_yVrNvrQESsB0k=.f091df72-107b-4208-b651-9e142b60665e () github ! com
[Download RAW message or body]

On Tue, 23 Nov 2021 11:05:27 GMT, Jayathirth D V <jdv@openjdk.org> wrote:

> 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().

test/jdk/javax/imageio/plugins/wbmp/WBMPStreamTruncateTest.java line 61:

> 59:         File imageFile = File.
> 60:                 createTempFile("test", ".wbmp", new File(filePath));
> 61:         imageFile.deleteOnExit();

In one another review I saw the deleteOnExit() usage, I remember that in case of full \
testrun via makefile, such files were not deleted, can you please confirm that it is \
work fine? probably it that was fixed already. Note that the full test run uses \
custom tmp folder inside the result dir.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6518


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic