- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 for ArrayIndexOutOfBoundsException (2.1 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/util/StringsTest.java
// When & Then - the implementation throws ArrayIndexOutOfBoundsException when buffer bounds are exceeded assertThrows(ArrayIndexOutOfBoundsException.class, () -> { Strings.findUNITermination(bufferWithoutTermination, 0, bufferWithoutTermination.length); }, "Should throw ArrayIndexOutOfBoundsException when termination not found within bounds"); } @TestRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/WinErrorTest.java
} } } @Nested @DisplayName("Boundary conditions") class Boundary { @Test void accessingInvalidIndexThrows() { assertThrows(ArrayIndexOutOfBoundsException.class, () -> { int dummy = WinError.WINERR_CODES[WinError.WINERR_CODES.length]; }); } } @Test @DisplayName("Mockito mock of WinError")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.7K 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/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/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)