From c0d145ebbe6f5a60b4e21f4aac761cb0583bc5b8 Mon Sep 17 00:00:00 2001 From: Ruud Schramp Date: Fri, 11 Feb 2022 19:58:06 +0100 Subject: [PATCH] Support byte-array primitive Crashes reporting: Fields 0: Array - [ - 0x5b fieldName Length - 1 - 0x00 01 Value - b - 0x62 className1 TC_STRING - 0x74 newHandle 0x00 7e 00 09 Length - 2 - 0x00 02 Value - [B - 0x5b42 . . Exception in thread "main" java.lang.RuntimeException: Error: Unexpected array field value type (0x7a at nb.deser.SerializationDumper.readArrayField(SerializationDumper.java:1497) at nb.deser.SerializationDumper.readFieldValue(SerializationDumper.java:989) --- src/nb/deser/SerializationDumper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nb/deser/SerializationDumper.java b/src/nb/deser/SerializationDumper.java index 17e91f6..47d00dd 100644 --- a/src/nb/deser/SerializationDumper.java +++ b/src/nb/deser/SerializationDumper.java @@ -1492,6 +1492,14 @@ private void readArrayField() { case (byte)0x71: //TC_REFERENCE this.readPrevObject(); break; + + case (byte)0x77: //TC_BLOCKDATA + this.readBlockData(); + break; + + case (byte)0x7a: //TC_BLOCKDATALONG + this.readLongBlockData(); + break; default: //Unknown throw new RuntimeException("Error: Unexpected array field value type (0x" + this.byteToHex(this._data.peek()));