- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for alignment (0.05 sec)
-
src/test/java/jcifs/smb1/dcerpc/ndr/NdrHyperTest.java
public void testEncodeRoundTrip() throws NdrException { final long original = 0x1122334455667788L; NdrHyper hyper = new NdrHyper(original); // Create buffer with extra space for alignment NdrBuffer buf = new NdrBuffer(new byte[16], 0); hyper.encode(buf); // Reset buffer position for decoding buf.reset(); NdrHyper decoded = new NdrHyper(0);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0) -
src/test/java/jcifs/smb1/dcerpc/ndr/NdrShortTest.java
* to the buffer and that alignment is respected. */ @Test void encodeWritesCorrectBytesAndAlignment() throws NdrException { NdrShort ns = new NdrShort(0xABCD); // value & 0xFF => 0xCD buf.reset(); int startIndex = buf.getIndex(); ns.encode(buf); // Find where the actual data starts (after alignment) int alignmentBytes = 0;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0) -
src/main/java/jcifs/pac/PacDataInputStream.java
import java.math.BigInteger; import java.util.Date; import jcifs.SmbConstants; import jcifs.smb.SID; /** * Input stream for reading PAC data structures with proper alignment and byte ordering. * Handles little-endian byte order and data alignment requirements of PAC structures. */ public class PacDataInputStream { private final DataInputStream dis; private final int size; /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java
smbComOpenAndX.useUnicode = true; // For Unicode: 1 byte (initial null in writeBytesWireFormat) // + potential 1 byte alignment (in writeString) + fileName.length() * 2 + 2 bytes (terminating nulls) // Since headerStart is 0 and dstIndex starts at 1 (after initial null), (1-0)%2=1, so alignment byte added // Total: 1 + 1 + 12*2 + 2 = 28 bytes byte[] dst = new byte[30]; // Use extra buffer space to avoid index errors
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.6K bytes - Viewed (0) -
src/test/java/jcifs/pac/PacDataInputStreamTest.java
// Test alignment from position 1 to 4 byte[] data = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 }; PacDataInputStream pdis = createInputStream(data); pdis.readByte(); // position is 1 pdis.align(4); assertEquals(1, pdis.available()); assertEquals(0x05, pdis.readByte()); // Test no alignment needed
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 9.2K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/Trans2FindFirst2Response.java
} String readString(final byte[] src, final int srcIndex, int len) { String str = null; try { if (useUnicode) { // should Unicode alignment be corrected for here? str = new String(src, srcIndex, len, UNI_ENCODING); } else { /* On NT without Unicode the fileNameLength
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 8.6K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/persistent/DurableHandleRequest.java
} @Override public byte[] getName() { return CONTEXT_NAME_BYTES; } @Override public int size() { // Context header (16) + name length (4) + padding to 8-byte alignment + data (16) return 16 + 4 + 4 + STRUCTURE_SIZE; } @Override public int encode(byte[] dst, int dstIndex) { int start = dstIndex; // Write context header
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 2.6K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/persistent/DurableHandleReconnect.java
*/ public byte[] getFileId() { return Arrays.copyOf(fileId, 16); } @Override public int size() { // Context header (16) + name length (4) + padding to 8-byte alignment + data (16) return 16 + 4 + 4 + STRUCTURE_SIZE; } @Override public int encode(byte[] dst, int dstIndex) { int start = dstIndex; // Write context header
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 3K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/Trans2SetFileInformation.java
writeInt2(0x80 | attributes, dst, dstIndex); dstIndex += 2; /* 6 zeros observed with NT */ writeInt8(0L, dst, dstIndex); dstIndex += 6; /* Also observed 4 byte alignment but we stick * with the default for jCIFS which is 2 */ return dstIndex - start; } @Override int readSetupWireFormat(final byte[] buffer, final int bufferIndex, final int len) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 3.3K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2Request.java
final int exp = size(); final int actual = getLength(); if (exp != actual) { // Log the size mismatch for debugging but don't throw exception // This can occur due to padding alignment differences between size8() and pad8() if (log.isDebugEnabled()) { log.debug("Size calculation mismatch: expected {} but got {} (difference: {})", exp, actual, actual - exp); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Mon Aug 25 14:34:10 UTC 2025 - 7.2K bytes - Viewed (0)