RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v4]

Volker Simonis simonis at openjdk.org
Tue May 2 16:54:32 UTC 2023


On Tue, 2 May 2023 15:52:03 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Throw StreamCorruptedException instead of InvalidClassException and handle negative array size in checkArray() as well
>
> test/jdk/java/io/ObjectInputStream/NegativeArraySizeTest.java line 77:
> 
>> 75:        byte[] serializedData = baos.toByteArray();
>> 76: 
>> 77:        // Find the right location to modify, looking for the first instance of TC_ENDBLOCKDATA
> 
> The comment should probably mention TC_BLOCKDATA, not TC_END...

Doh! Fixed two comments but forgot the third one. Will fix.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13540#discussion_r1182803335


More information about the core-libs-dev mailing list