Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 37 of 37 for ArrayIndexOutOfBoundsException (1.86 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

            headerStartField.setAccessible(true);
            headerStartField.set(response, 0);
    
            // When & Then - should throw when trying to read beyond buffer
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> response.readBytesWireFormat(smallBuffer, bodyStart));
        }
    
        @Test
        @DisplayName("Should handle Reserved2 field correctly")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  6. 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)
  7. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

                // Given
                byte[] buffer = new byte[59]; // One byte too small
                SMBUtil.writeInt2(60, buffer, 0);
    
                // When & Then
                assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
                    response.readBytesWireFormat(buffer, 0);
                });
            }
        }
    
        @Nested
        @DisplayName("SmbBasicFileInfo Interface Tests")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 26.9K bytes
    - Viewed (0)
Back to top