Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for StructureSize (0.07 sec)

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

            void testInvalidStructureSizes(int structureSize) {
                byte[] buffer = new byte[64];
                SMBUtil.writeInt2(structureSize, buffer, 0);
    
                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, 0));
    
                assertEquals("Expected structureSize = 17", exception.getMessage());
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/lock/Smb2LockResponseTest.java

                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex));
                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
            @ParameterizedTest
            @ValueSource(ints = { 0, 1, 2, 3, 5, 6, 8, 16, 100, 255, 1024, 4096, 65535 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/ServerResponseValidator.java

                // SMB1
                if (structureSize < 32 || structureSize > 65535) {
                    failedValidations.incrementAndGet();
                    throw new SmbException("Invalid SMB1 header size: " + structureSize);
                }
            }
            // Check SMB2/3 signature
            else if (protocolId == 0x424D53FE) { // 0xFE 'S' 'M' 'B'
                // SMB2/3
                if (structureSize != 64) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

        @ValueSource(ints = { 0, 1, 2, 3, 5, 10, 100, 65535 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            int offset = 0;
    
            // Write invalid structure size
            SMBUtil.writeInt2(structureSize, buffer, offset);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  5. docs/smb3-features/01-smb3-lease-design.md

        }
        
        @Override
        protected int readPayload(byte[] buffer, int offset) throws SMBProtocolDecodingException {
            int start = offset;
            
            // StructureSize (2 bytes)
            structureSize = readInt2(buffer, offset);
            offset += 2;
            
            // Reserved (2 bytes)
            offset += 2;
            
            // Flags (4 bytes)
            flags = readInt4(buffer, offset);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 22K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java

                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex));
                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
            @ParameterizedTest
            @ValueSource(ints = { 0, 1, 2, 3, 5, 6, 100, 255, 65535 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlResponseTest.java

            return buf;
        }
    
        // Helper: build an error body (without header) with structureSize=9
        private static byte[] buildErrorBody(int errorContextCount, int bc, byte[] errorData) {
            int bodyLen = 8 + bc; // 8 bytes fixed + variable data
            byte[] buf = new byte[bodyLen];
            SMBUtil.writeInt2(9, buf, 0); // structureSize
            buf[2] = (byte) errorContextCount; // ErrorContextCount
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoResponseTest.java

                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 2", exception.getMessage());
        }
    
        @Test
        @DisplayName("Test readBytesWireFormat with zero structure size throws exception")
        void testReadBytesWireFormatZeroStructureSize() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponseTest.java

        @ValueSource(ints = { 0, 1, 2, 4, 8, 15, 17, 32, 64, 65535 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            int offset = 0;
    
            // Write invalid structure size
            SMBUtil.writeInt2(structureSize, buffer, offset);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/Smb2EchoResponseTest.java

                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
            @ParameterizedTest
            @ValueSource(ints = { 0, 1, 2, 3, 5, 6, 100, 65535 })
            @DisplayName("Should throw exception for various invalid structure sizes")
            void testReadBytesWireFormatVariousInvalidSizes(int structureSize) {
                byte[] buffer = new byte[1024];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top