RFR: JDK-8294702 - BufferedInputStream uses undefined value range for markpos [v2]

Markus KARG duke at openjdk.org
Sun Oct 9 14:08:41 UTC 2022


On Tue, 4 Oct 2022 15:53:04 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> This is true, but if a broken subclass sets markpos to less than -1 then lots of code lines will work incorrectly -- including `transferTo` which was the starting point of your change proposal. So do you really only want undo the change *here*, or is it better drop this PR and even use `< 0` in `transferTo`, as I originally proposed?
>
>> This is true, but if a broken subclass sets markpos to less than -1 then lots of code lines will work incorrectly -- including `transferTo` which was the starting point of your change proposal. So do you really only want undo the change _here_, or is it better drop this PR and even use `< 0` in `transferTo`, as I originally proposed?
> 
> This looks to be the only that would corrupt the current position (pos). 
> 
> @bplb plans to look at this too, another set of eyes would be good on this point.

@AlanBateman Checking `< 0` just here, as per your proposal. 👍 

@bplb Kindly requesting `/sponsor`. 😃

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

PR: https://git.openjdk.org/jdk/pull/10528


More information about the core-libs-dev mailing list