- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for smallBuffer (0.08 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/util/EncdecTest.java
void testBufferBounds() { // Given byte[] smallBuffer = new byte[2]; // When/Then assertThrows(IndexOutOfBoundsException.class, () -> { Encdec.enc_uint32le(0x12345678, smallBuffer, 0); }); assertThrows(IndexOutOfBoundsException.class, () -> { Encdec.dec_uint32le(smallBuffer, 0); }); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K 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/smb/compression/CompressionNegotiateContextTest.java
} @Test @DisplayName("Test invalid buffer size for decoding") public void testInvalidBufferSize() { byte[] smallBuffer = new byte[4]; // Too small assertThrows(SMBProtocolDecodingException.class, () -> { context.decode(smallBuffer, 0, smallBuffer.length); }); } @Test @DisplayName("Test algorithm name resolution") public void testAlgorithmNames() {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 5.6K 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/smb/compression/DefaultCompressionServiceTest.java
byte[] compressed = compressionService.compress(testData, CompressionService.COMPRESSION_LZ77); byte[] smallBuffer = new byte[10]; // Too small assertThrows(CIFSException.class, () -> { compressionService.decompress(compressed, 0, compressed.length, smallBuffer, 0, CompressionService.COMPRESSION_LZ77); }); } /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 9.1K bytes - Viewed (0)