- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 133 for Overflow (0.04 sec)
-
src/test/java/jcifs/internal/util/SMBUtilTest.java
assertEquals((byte) 0x00, SMBUtil.SMB2_HEADER[5]); } @ParameterizedTest @CsvSource({ "0, 0", "1, 1", "255, 255", "256, 256", "65535, 65535", "65536, 0", // Overflow test for 2-byte write "16777215, 16777215" }) void testWriteReadInt2RoundTrip(long input, int expected) { byte[] buffer = new byte[4]; SMBUtil.writeInt2(input, buffer, 0);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java
int written = request.writeBytesWireFormat(buffer, 0); assertEquals(24, written); assertEquals(24, SMBUtil.readInt2(buffer, 0)); } @Test @DisplayName("Test buffer overflow protection") void testBufferOverflowProtection() { byte[] smallBuffer = new byte[23]; // One byte too small // Should throw ArrayIndexOutOfBoundsExceptionRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
assertEquals( "The mean of x and y should equal the mean of y and x", expectedMean, IntMath.mean(y, x)); } /** * Computes the mean in a way that is obvious and resilient to overflow by using BigInteger * arithmetic. */ private static int computeMeanSafely(int x, int y) { BigInteger bigX = BigInteger.valueOf(x); BigInteger bigY = BigInteger.valueOf(y);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2TransformHeaderTest.java
// When/Then assertThrows(Exception.class, () -> { Smb2TransformHeader.decode(shortBuffer, 0); }); } @Test @DisplayName("Should handle buffer overflow during encode") void testBufferOverflowEncode() { // Given byte[] shortBuffer = new byte[20]; // Too short for transform headerRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.7K bytes - Viewed (0) -
guava/src/com/google/common/primitives/UnsignedInteger.java
public static final UnsignedInteger MAX_VALUE = fromIntBits(-1); private final int value; private UnsignedInteger(int value) { // GWT doesn't consistently overflow values to make them 32-bit, so we need to force it. this.value = value & 0xffffffff; } /** * Returns an {@code UnsignedInteger} corresponding to a given bit representation. The argument is
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 8.3K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
} return result.readUtf8() } /** Used for tags and subidentifiers. */ private fun readVariableLengthLong(): Long { // TODO(jwilson): detect overflow. var result = 0L while (true) { val byteN = source.readByte().toLong() and 0xff if ((byteN and 0b1000_0000L) == 0b1000_0000L) { result = (result + (byteN and 0b0111_1111)) shl 7Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/ShortsTest.java
} @GwtIncompatible // different overflow behavior; could probably be made to work by using ~~ public void testConcat_overflow_negative() { int dim1 = 1 << 16; int dim2 = 1 << 15; assertThat(dim1 * dim2).isLessThan(0); testConcatOverflow(dim1, dim2); } @GwtIncompatible // different overflow behavior; could probably be made to work by using ~~
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 27.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
} @J2ktIncompatible @GwtIncompatible // threads public void testOverflowTimeout() throws Exception { // First, sanity check that naive multiplication would really overflow to a negative number: long nanosPerSecond = NANOSECONDS.convert(1, SECONDS); assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/PairedStatsAccumulatorTest.java
accumulator.add(ONE_VALUE, OTHER_ONE_VALUE); for (int power = 1; power < Long.SIZE - 1; power++) { accumulator.addAll(accumulator.snapshot()); } // Should overflow without throwing. accumulator.addAll(accumulator.snapshot()); assertThat(accumulator.count()).isLessThan(0L); } public void testXStats() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 23.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Lists.java
public static <E extends @Nullable Object> ArrayList<E> newArrayList(E... elements) { checkNotNull(elements); // for GWT // Avoid integer overflow when a large array is passed in int capacity = computeArrayListCapacity(elements.length); ArrayList<E> list = new ArrayList<>(capacity); Collections.addAll(list, elements); return list; }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 42.6K bytes - Viewed (0)