Skip to main content

preprocess_jdk8u20

Function preprocess_jdk8u20 

Source
pub fn preprocess_jdk8u20(data: &[u8]) -> Vec<u8> 
Expand description

Preprocess JDK 8u20 serialization data by inserting a missing TC_ENDBLOCKDATA.

JDK 8u20 exploit payloads omit a TC_ENDBLOCKDATA byte after a TC_REFERENCE to handle 0x7e0009, causing annotation parsing to fail. This function inserts the missing byte, mirroring zkar’s FromJDK8u20Bytes preprocessing.

Note: parse_serialization_stream automatically applies this preprocessing on retry, so explicit use is only needed for debugging or raw byte manipulation.