- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for ArrayIndexOutOfBoundsException (0.61 sec)
-
src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java
void testReadDataWireFormatEmptyBuffer() { byte[] buffer = new byte[0]; // Empty buffer causes ArrayIndexOutOfBoundsException when trying to read assertThrows(ArrayIndexOutOfBoundsException.class, () -> { response.readDataWireFormat(buffer, 0, 0); }); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.4K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/NtlmMessageTest.java
buffer.putShort(0, (short) 1); buffer.putShort(2, (short) 1); buffer.putInt(4, data.length + 1); // Invalid offset assertThrows(ArrayIndexOutOfBoundsException.class, () -> NtlmMessage.readSecurityBuffer(data, 0), "Should throw ArrayIndexOutOfBoundsException for invalid offset."); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/DosErrorTest.java
} @Test @DisplayName("Messages: accessing invalid index throws ArrayIndexOutOfBoundsException") void messagesOutOfBoundsThrows() { // Arrange String[] msgs = DosError.DOS_ERROR_MESSAGES; // Act & Assert: negative index assertThrows(ArrayIndexOutOfBoundsException.class, () -> { @SuppressWarnings("unused") String s = msgs[-1]; });Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.9K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcShareGetInfoTest.java
infoField.setAccessible(true); infoField.set(msrpcShareGetInfo, info502); // This should throw an ArrayIndexOutOfBoundsException when trying to read beyond array assertThrows(ArrayIndexOutOfBoundsException.class, () -> { msrpcShareGetInfo.getSecurity(); }); } @Test void testGetSecurityWithWrongInfoType() throws Exception {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescResponseTest.java
void testReadDataWireFormatWithIOException() throws Exception { // Create an invalid security descriptor buffer that will cause ArrayIndexOutOfBoundsException byte[] buffer = new byte[4]; // Set error code to 0 setErrorCode(response, 0); // ArrayIndexOutOfBoundsException is thrown when buffer is too small
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComLockingAndXTest.java
assertTrue(repr.contains("newOplockLevel=2")); } /** * Test decoding of bytes buffer that is too short triggers an exception. * Note: The actual implementation throws ArrayIndexOutOfBoundsException * when the buffer is too short, not SMBProtocolDecodingException. */ @Test void readBytesWireFormatTooShortException() { Configuration cfg = mock(Configuration.class);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/EncodableTest.java
void encodeThrowsWhenDestinationTooSmall() { byte[] src = makeSeq(5); Encodable enc = new ByteEncodable(src, 0, 5); byte[] dst = new byte[4]; // too small assertThrows(ArrayIndexOutOfBoundsException.class, () -> enc.encode(dst, 0), "System.arraycopy should throw for insufficient destination space"); } @Test @DisplayName("encode() throws when dstIndex causes overflow")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.6K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcExceptionTest.java
// The current implementation has a bug in the binary search that causes ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { DcerpcException.getMessageByDcerpcError(unknownCode); }, "Should throw ArrayIndexOutOfBoundsException due to binary search bug"); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponseTest.java
// Given byte[] buffer = new byte[15]; // Too small for 16-byte structure SMBUtil.writeInt2(16, buffer, 0); // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> { response.readBytesWireFormat(buffer, 0); }); } @Test @DisplayName("Should handle offset exceeding buffer") void testOffsetExceedsBuffer() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 19.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java
byte[] dst = new byte[10]; // Too small for the full parameters // Should throw ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { netServerEnum2.writeParametersWireFormat(dst, 0); }); } @Test @DisplayName("Test writeParametersWireFormat with large buffer succeeds") void testWriteParametersWireFormatLargeBuffer() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.7K bytes - Viewed (0)