Re: RFR: 8361635: Missing List length validation in the Class-File API [v2]

2025-07-13 Thread Chen Liang
> The `class` file format often only stores lists up to 65535 in size because > size is encoded as a u2. Currently, we truncate the list size and write all > contents, creating malformed `class` files. Almost all scenarios where such > oversized lists are created can be considered an error; we s

Re: RFR: 8361635: Missing List length validation in the Class-File API

2025-07-11 Thread Adam Sotona
On Thu, 10 Jul 2025 21:01:18 GMT, Chen Liang wrote: > The `class` file format often only stores lists up to 65535 in size because > size is encoded as a u2. Currently, we truncate the list size and write all > contents, creating malformed `class` files. Almost all scenarios where such > oversi

Re: RFR: 8361635: Missing List length validation in the Class-File API

2025-07-11 Thread Chen Liang
On Thu, 10 Jul 2025 21:01:18 GMT, Chen Liang wrote: > The `class` file format often only stores lists up to 65535 in size because > size is encoded as a u2. Currently, we truncate the list size and write all > contents, creating malformed `class` files. Almost all scenarios where such > oversi

Re: RFR: 8361635: Missing List length validation in the Class-File API

2025-07-11 Thread Adam Sotona
On Fri, 11 Jul 2025 14:25:40 GMT, Chen Liang wrote: >> The `class` file format often only stores lists up to 65535 in size because >> size is encoded as a u2. Currently, we truncate the list size and write all >> contents, creating malformed `class` files. Almost all scenarios where such >> ov

RFR: 8361635: Missing List length validation in the Class-File API

2025-07-10 Thread Chen Liang
The `class` file format often only stores lists up to 65535 in size because size is encoded as a u2. Currently, we truncate the list size and write all contents, creating malformed `class` files. Almost all scenarios where such oversized lists are created can be considered an error; we should ea