From fd358d29dc25ba3ff86ebfadccf9aa8ccc18e900 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 6 Oct 2023 19:00:57 +0200 Subject: [PATCH] fix #1237 Use ensureCapacity in ByteBufferVirtualObject http://bitnami/issues/7588 --- Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java b/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java index 933bc0c77a..761a12ac21 100644 --- a/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java +++ b/Shared/src/org/bimserver/shared/ByteBufferVirtualObject.java @@ -57,6 +57,7 @@ public ByteBufferVirtualObject(QueryContext reusable, EClass eClass, int capacit this.uuid = reusable.getDatabaseInterface().newUuid(); int unsettedLength = reusable.getPackageMetaData().getUnsettedLength(eClass); + ensureCapacity(buffer.position(), 16 + unsettedLength); buffer.put(new byte[unsettedLength]); buffer.putLong(this.uuid.getMostSignificantBits()); buffer.putLong(this.uuid.getLeastSignificantBits());