Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for testBufferOverflowProtection (0.15 sec)

  1. src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java

            assertEquals(24, written);
            assertEquals(24, SMBUtil.readInt2(buffer, 0));
        }
    
        @Test
        @DisplayName("Test buffer overflow protection")
        void testBufferOverflowProtection() {
            byte[] smallBuffer = new byte[23]; // One byte too small
    
            // Should throw ArrayIndexOutOfBoundsException
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java

                assertEquals(49, SMBUtil.readInt2(buffer, 0));
            }
    
            @Test
            @DisplayName("Should handle buffer overflow protection")
            void testBufferOverflowProtection() {
                request.setReadLength(65536);
    
                byte[] smallBuffer = new byte[48]; // Smaller than required 49 bytes
    
                // Should not overflow buffer
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

            }
    
            @Test
            @DisplayName("Should handle buffer overflow protection")
            void testBufferOverflowProtection() {
                Smb2Lock[] locks = new Smb2Lock[] { new Smb2Lock(0L, 100L, Smb2Lock.SMB2_LOCKFLAG_EXCLUSIVE_LOCK),
                        new Smb2Lock(200L, 300L, Smb2Lock.SMB2_LOCKFLAG_SHARED_LOCK) };
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/create/Smb2CloseRequestTest.java

            assertEquals(24, written);
            assertEquals(24, SMBUtil.readInt2(buffer, 0));
        }
    
        @Test
        @DisplayName("Test buffer overflow protection")
        void testBufferOverflowProtection() {
            byte[] smallBuffer = new byte[23]; // One byte too small
    
            // Should throw ArrayIndexOutOfBoundsException
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
Back to top