Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testBufferTooSmall (0.18 sec)

  1. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponseTest.java

            assertEquals(0xFFFFFFFF, response.getMaximalAccess());
        }
    
        @Test
        @DisplayName("Should handle buffer too small for reading")
        void testBufferTooSmall() {
            // Given
            byte[] buffer = new byte[15]; // Too small for 16-byte structure
            SMBUtil.writeInt2(16, buffer, 0);
    
            // When & Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/ServerResponseValidatorTest.java

        public void testNullBuffer() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validateBuffer(null, 100, 1024);
            });
        }
    
        @Test
        public void testBufferTooSmall() throws Exception {
            byte[] buffer = new byte[50];
            assertThrows(SmbException.class, () -> {
                validator.validateBuffer(buffer, 100, 1024);
            });
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.2K bytes
    - Viewed (0)
Back to top