Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 44 for StructureSize (0.21 sec)

  1. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java

        void testInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            SMBUtil.writeInt2(structureSize, buffer, 0);
    
            // When & Then
            SMBProtocolDecodingException exception =
                    assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, 0));
            assertEquals("Expected structureSize = 9", exception.getMessage());
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

        @ValueSource(ints = { 0, 1, 8, 10, 16, 18, 100, 65535 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            int bufferIndex = 0;
    
            // Write invalid structure size
            SMBUtil.writeInt2(structureSize, buffer, bufferIndex);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/nego/Smb2NegotiateResponse.java

            }
    
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 65) {
                throw new SMBProtocolDecodingException("Structure size is not 65, got: " + structureSize);
            }
    
            this.securityMode = SMBUtil.readInt2(buffer, bufferIndex + 2);
            // Validate security mode flags
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/util/SMBUtil.java

         * SMB2 protocol header template with magic number 0xFE 'SMB'
         */
        public static final byte[] SMB2_HEADER = { (byte) 0xFE, (byte) 'S', (byte) 'M', (byte) 'B', // ProtocolId
                (byte) 64, (byte) 0x00, // StructureSize (LE)
                (byte) 0x00, (byte) 0x00, // CreditCharge (reserved 2.0.2)
                (byte) 0x00, (byte) 0x00, // ChannelSequence
                (byte) 0x00, (byte) 0x00, // Reserved
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java

            final int start = bufferIndex;
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 9) {
                throw new SMBProtocolDecodingException("Error structureSize should be 9");
            }
            this.errorContextCount = buffer[bufferIndex + 2];
            bufferIndex += 4;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/create/Smb2CreateResponse.java

        @Override
        protected int readBytesWireFormat(final byte[] buffer, int bufferIndex) throws SMBProtocolDecodingException {
            final int start = bufferIndex;
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
    
            if (structureSize != 89) {
                throw new SMBProtocolDecodingException("Structure size is not 89");
            }
    
            this.oplockLevel = buffer[bufferIndex + 2];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java

            int written = request.writeBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(32, written);
    
            // Verify complete structure
            assertEquals(32, SMBUtil.readInt2(buffer, 0)); // StructureSize
            assertEquals(0x0001, SMBUtil.readInt2(buffer, 2)); // Flags
            assertEquals(8192, SMBUtil.readInt4(buffer, 4)); // OutputBufferLength
            // FileId at offset 8-23
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java

                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 9", exception.getMessage());
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 100, 255, 256, 65535 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.5K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupResponseTest.java

         * securityBufferOffset is set relative to header start.
         */
        private void buildSessionSetupBody(byte[] buf, int headerStart, int bodyStart, int sessionFlags, int secBufOffset, byte[] blob) {
            // StructureSize (must be 9)
            SMBUtil.writeInt2(9, buf, bodyStart);
            // SessionFlags at +2
            SMBUtil.writeInt2(sessionFlags, buf, bodyStart + 2);
            // SecurityBufferOffset (+4) and Length (+6)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java

                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 9", exception.getMessage());
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 100, 255, 256, 65535 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.5K bytes
    - Viewed (0)
Back to top