- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for smallBuffer (0.14 sec)
-
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) -
src/test/java/jcifs/internal/smb2/nego/NegotiateContextRequestTest.java
void testBufferBoundaries() { byte[] smallBuffer = new byte[10]; int[] ciphers = { 1, 2 }; EncryptionNegotiateContext context = new EncryptionNegotiateContext(mockConfig, ciphers); // Should encode successfully at the beginning int encoded = context.encode(smallBuffer, 0); assertEquals(6, encoded);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoRequestTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java
void testBufferOverflowProtection() { request.setReadLength(65536); byte[] smallBuffer = new byte[48]; // Smaller than required 49 bytes // Should not overflow buffer assertThrows(ArrayIndexOutOfBoundsException.class, () -> request.writeBytesWireFormat(smallBuffer, 0)); } @Test @DisplayName("Should handle write at buffer boundary")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java
Smb2TreeConnectRequest req = new Smb2TreeConnectRequest(mockConfig, longPath); byte[] smallBuffer = new byte[20]; // Too small for header + path // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> { req.encode(smallBuffer, 0); }); } @Test @DisplayName("Should correctly inherit from ServerMessageBlock2Request")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CloseRequestTest.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 - 20.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java
byte[] largeData = new byte[1000]; request.setData(largeData, 0, largeData.length); byte[] smallBuffer = new byte[100]; IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> request.writeBytesWireFormat(smallBuffer, 0)); assertTrue(exception.getMessage().contains("Data exceeds buffer size")); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
Smb2LockRequest req = new Smb2LockRequest(mockConfig, testFileId, locks); byte[] smallBuffer = new byte[50]; // Smaller than required // Should not overflow buffer assertThrows(ArrayIndexOutOfBoundsException.class, () -> req.writeBytesWireFormat(smallBuffer, 0)); } @Test @DisplayName("Should handle write at buffer boundary")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0)