- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for smallBuffer (0.05 sec)
-
src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationResponseTest.java
void testBoundaryConditions() { byte[] smallBuffer = new byte[10]; // Test with maximum offset int result = response.writeSetupWireFormat(smallBuffer, Integer.MAX_VALUE); assertEquals(0, result); result = response.readSetupWireFormat(smallBuffer, Integer.MAX_VALUE, 0); assertEquals(0, result);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockTest.java
byte[] smallBuffer = new byte[24]; lock = new Smb2Lock(100L, 200L, 1); int encoded = lock.encode(smallBuffer, 0); assertEquals(24, encoded); assertEquals(100L, SMBUtil.readInt8(smallBuffer, 0)); assertEquals(200L, SMBUtil.readInt8(smallBuffer, 8)); assertEquals(1, SMBUtil.readInt4(smallBuffer, 16)); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransPeekNamedPipeTest.java
byte[] smallBuffer = new byte[1]; byte[] largeBuffer = new byte[1000]; // Act & Assert assertEquals(0, transPeekNamedPipe.readSetupWireFormat(smallBuffer, 0, 1)); assertEquals(0, transPeekNamedPipe.readSetupWireFormat(largeBuffer, 500, 500)); assertEquals(0, transPeekNamedPipe.readParametersWireFormat(smallBuffer, 0, 1));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/nt/FileNotifyInformationImplTest.java
int offset = 50; byte[] smallBuffer = createValidNotificationBuffer(fileName, action); byte[] buffer = new byte[smallBuffer.length + offset + 50]; System.arraycopy(smallBuffer, 0, buffer, offset, smallBuffer.length); int bytesRead = notifyInfo.decode(buffer, offset, smallBuffer.length); assertTrue(bytesRead > 0);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java
// Given byte[] smallBuffer = new byte[100]; int bodyStart = 0; int dataLength = 50; int dataOffsetValue = 80; // Data would extend beyond buffer // Write structure SMBUtil.writeInt2(17, smallBuffer, bodyStart); smallBuffer[bodyStart + 2] = (byte) dataOffsetValue; SMBUtil.writeInt4(dataLength, smallBuffer, bodyStart + 4);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 22.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java
@DisplayName("Test buffer overflow protection") void testBufferOverflowProtection() { byte[] smallBuffer = new byte[23]; // One byte too small // Should throw ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { request.writeBytesWireFormat(smallBuffer, 0); }); } @Test @DisplayName("Test file ID boundary values")Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java
} @Test @DisplayName("Should throw exception on buffer overflow") void testEncodeWithBufferOverflow() { byte[] smallBuffer = new byte[10]; assertThrows(ArrayIndexOutOfBoundsException.class, () -> testRequest.encode(smallBuffer, 5), "Should throw exception when buffer is too small"); } @Test @DisplayName("Should handle zero-length name")Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationTest.java
void testWithDifferentBufferSizes() { // Test with buffers of different sizes byte[] smallBuffer = new byte[] { 0x01 }; byte[] mediumBuffer = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 }; SmbNegotiation negotiationDifferentSizes = new SmbNegotiation(mockRequest, mockResponse, smallBuffer, mediumBuffer); assertEquals(1, negotiationDifferentSizes.getRequestRaw().length);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/NegotiateContextResponseTest.java
EncryptionNegotiateContext context = new EncryptionNegotiateContext(mockConfig, new int[] { 1, 2 }); byte[] smallBuffer = new byte[100]; // Make buffer large enough byte[] largeBuffer = new byte[1000]; // Act int smallEncodedSize = context.encode(smallBuffer, 0); int largeEncodedSize = context.encode(largeBuffer, 500); // Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 19.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralTest.java
// Given trans2GetDfsReferral = new Trans2GetDfsReferral(mockConfig, "test"); // Test with minimum size buffer byte[] smallBuffer = new byte[2]; assertEquals(2, trans2GetDfsReferral.writeSetupWireFormat(smallBuffer, 0)); // Test with exact size buffer byte[] exactBuffer = new byte[2]; assertEquals(2, trans2GetDfsReferral.writeSetupWireFormat(exactBuffer, 0));Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11K bytes - Viewed (0)