Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 352 for zeros (0.02 sec)

  1. src/test/java/jcifs/internal/smb2/lock/Smb2LockTest.java

                lock = new Smb2Lock(999L, 888L, 0xFF);
    
                // Fill buffer with non-zero values
                Arrays.fill(buffer, (byte) 0xFF);
    
                lock.encode(buffer, 0);
    
                // Reserved field bytes are not modified by the encode method
                // The implementation just skips these bytes without writing zeros
                assertEquals(-1, SMBUtil.readInt4(buffer, 20));
            }
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopyTest.java

        @Nested
        @DisplayName("Edge Case Tests")
        class EdgeCaseTests {
    
            @Test
            @DisplayName("Should handle source key with all zeros")
            void testSourceKeyAllZeros() {
                // Given
                byte[] zeroKey = new byte[SOURCE_KEY_SIZE]; // All zeros by default
                SrvCopychunk chunk = new SrvCopychunk(1, 2, 3);
                SrvCopychunkCopy copy = new SrvCopychunkCopy(zeroKey, chunk);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java

            SMBUtil.writeInt4(104, buffer, 8); // NextEntryOffset to second entry
            SMBUtil.writeInt4(0, buffer, 12); // FileIndex
            // ... rest of first entry fields (zeros for simplicity)
            for (int i = 16; i < 102; i++) {
                buffer[i] = 0;
            }
            SMBUtil.writeInt4(8, buffer, 68); // FileNameLength at offset 60 from start
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoResponseTest.java

            assertEquals(0, response.getCapabilities(), "Capabilities should be zero");
            assertArrayEquals(new byte[16], response.getServerGuid(), "Server GUID should be all zeros");
            assertEquals(0, response.getSecurityMode(), "Security mode should be zero");
            assertEquals(0, response.getDialect(), "Dialect should be zero");
        }
    
        @Test
        @DisplayName("Test decode with maximum values")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/NtlmUtilTest.java

            assertArrayEquals(clientChallenge, Arrays.copyOfRange(resp, 16, 24), "Client challenge must be copied to last 8 bytes");
            assertFalse(Arrays.equals(new byte[24], resp), "Response must not be all zeros");
        }
    
        @Test
        @DisplayName("getLMv2Response(byte[]): empty client data allowed")
        void testGetLMv2Response_bytes_emptyClientData() {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/SmbInfoAllocationTest.java

        }
    
        @Test
        @DisplayName("Test getCapacity with zero values")
        void testGetCapacityWithZeroValues() throws SMBProtocolDecodingException {
            // Prepare test data with zeros
            byte[] buffer = new byte[22];
    
            // All zeros
            for (int i = 0; i < buffer.length; i++) {
                buffer[i] = 0;
            }
    
            // Decode
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java

            SMBUtil.writeInt2(0x0302, buffer, 4);
    
            // Negotiate context count (0 for non-3.1.1)
            SMBUtil.writeInt2(0, buffer, 6);
    
            // Server GUID (16 bytes of zeros)
            // Already initialized to zeros
    
            // Capabilities
            SMBUtil.writeInt4(Smb2Constants.SMB2_GLOBAL_CAP_DFS, buffer, 24);
    
            // Max sizes (reasonable values)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  8. src/archive/zip/zip_test.go

    			got := string(readBuf[:n])
    			if err != nil || got != want {
    				t.Errorf("off %d, size %d = %v, %v (%q); want %q", off, size, n, err, got, want)
    			}
    		}
    	}
    
    }
    
    type zeros struct{}
    
    func (zeros) Read(p []byte) (int, error) {
    	clear(p)
    	return len(p), nil
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. src/archive/tar/reader.go

    		if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil {
    			return nil, nil, err // EOF is okay here; exactly 1 block of zeros read
    		}
    		if bytes.Equal(tr.blk[:], zeroBlock[:]) {
    			return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read
    		}
    		return nil, nil, ErrHeader // Zero block and then non-zero block
    	}
    
    	// Verify the header matches a known format.
    	format := tr.blk.getFormat()
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationTest.java

            trans2SetFileInfo = new Trans2SetFileInformation(config, TEST_FID, mockFileInfo);
    
            byte[] buffer = new byte[512];
            // Fill buffer with non-zero values to ensure padding writes zeros
            for (int i = 0; i < buffer.length; i++) {
                buffer[i] = (byte) 0xFF;
            }
    
            int written = trans2SetFileInfo.writeDataWireFormat(buffer, 0);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.8K bytes
    - Viewed (0)
Back to top