- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 52 for ArrayIndexOutOfBoundsException (0.09 sec)
-
src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java
request.setFileId(shortFileId); byte[] buffer = new byte[256]; // Should handle gracefully or throw appropriate exception assertThrows(ArrayIndexOutOfBoundsException.class, () -> request.writeBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should handle all parameters at maximum") void testAllParametersMaximum() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.8K bytes - Viewed (0) -
src/test/java/jcifs/pac/PacTest.java
writeLittleEndianInt(baos, 100); // size writeLittleEndianLong(baos, 1000); // offset way out of bounds byte[] pacData = baos.toByteArray(); // This currently throws ArrayIndexOutOfBoundsException // but should be wrapped in PACDecodingException assertThrows(Exception.class, () -> new Pac(pacData, keys)); } @Test void testZeroBufferCount() throws IOException {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java
if (dstIndex < 0) { throw new IllegalArgumentException("Destination index cannot be negative"); } if (dstIndex + encodedSize > dst.length) { throw new ArrayIndexOutOfBoundsException("Buffer overflow"); } // Simulate encoding: write header (8 bytes) Arrays.fill(dst, dstIndex, dstIndex + 8, (byte) 0xFF); int offset = dstIndex + 8;
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumTest.java
@DisplayName("Test writeParametersWireFormat with small buffer throws ArrayIndexOutOfBoundsException") void testWriteParametersWireFormatSmallBuffer() { netShareEnum = new NetShareEnum(realConfig); // Buffer too small for the full parameters (need at least 19 bytes) byte[] dst = new byte[10]; assertThrows(ArrayIndexOutOfBoundsException.class, () -> {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SIDCacheImplTest.java
assertThrows(NullPointerException.class, () -> cache.resolveSids(ctx, "server", null, 0, 1)); // Bad offset/length leads to ArrayIndexOutOfBoundsException jcifs.SID[] sids = new jcifs.SID[] { sid("S-1-1-0") }; assertThrows(ArrayIndexOutOfBoundsException.class, () -> cache.resolveSids(ctx, "server", sids, 1, 2)); } @Nested class EdgeCasesForResolveSids { @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java
void testReadBytesWireFormatInsufficientBuffer() { // Given byte[] buffer = new byte[1]; // Too small // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> response.readBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should handle negative structure size as unsigned")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.3K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/Type2MessageTest.java
// Challenge bytes would be at 24-31 but we're truncated // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> new Type2Message(truncatedMessage)); } @Test @DisplayName("parse should handle truncated message missing target info")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 38.9K 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") void testInheritance() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0) -
src/main/java/jcifs/smb1/util/MD4.java
// make sure we don't exceed input's allocated size/length if (offset < 0 || len < 0 || (long) offset + len > input.length) { throw new ArrayIndexOutOfBoundsException(); } // compute number of bytes still unhashed; ie. present in buffer int bufferNdx = (int) (count % BLOCK_LENGTH); count += len; // update number of bytes
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 9.6K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLongs.java
* a number. Does not verify whether supplied radix is valid, passing an invalid radix will give * undefined results or an ArrayIndexOutOfBoundsException. */ static boolean overflowInParse(long current, int digit, int radix) { if (current >= 0) { if (current < maxValueDivs[radix]) { return false; }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 17.8K bytes - Viewed (0)