Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateMessageSize (0.1 sec)

  1. src/test/java/jcifs/util/ServerResponseValidatorTest.java

            validator.validateMessageSize(1024, false);
            validator.validateMessageSize(65535, true);
            validator.validateMessageSize(1048576, false); // 1MB for SMB2
        }
    
        @Test
        public void testMessageSizeTooSmall() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validateMessageSize(20, false);
            });
        }
    
        @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)
  2. src/main/java/jcifs/util/ServerResponseValidator.java

         * Validate SMB message size
         *
         * @param size the message size
         * @param isSmb1 whether this is SMB1 protocol
         * @throws SmbException if size is invalid
         */
        public void validateMessageSize(int size, boolean isSmb1) throws SmbException {
            totalValidations.incrementAndGet();
    
            if (size < MIN_SMB_HEADER_SIZE) {
                failedValidations.incrementAndGet();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
Back to top