- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 69 for Overflow (0.11 sec)
-
src/main/java/jcifs/util/InputValidator.java
* * @param a first operand * @param b second operand * @return sum of a and b * @throws ArithmeticException if overflow occurs */ public static int safeAdd(int a, int b) { validateIntegerAddition(a, b, "Addition"); return a + b; } /** * Safe integer multiplication with overflow check * * @param a first operand
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 13.5K bytes - Viewed (0) -
src/main/java/jcifs/util/ServerResponseValidator.java
integerOverflowsPrevented.incrementAndGet(); log.warn("Integer overflow in addition: {} + {} = {}", a, b, result); throw new SmbException("Integer overflow detected"); } return (int) result; } /** * Safely multiply integers checking for overflow * * @param a first value * @param b second value * @return product
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 16.6K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
// overflow, return. return naiveSum; } // we did over/under flow, if the sign is negative we should return MAX otherwise MIN return Long.MAX_VALUE + ((naiveSum >>> (Long.SIZE - 1)) ^ 1); } /** * Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java
import jcifs.internal.util.SMBUtil; /** * Security-focused test cases for Smb2NegotiateResponse input validation. * Tests various malformed input scenarios to ensure proper validation and * protection against buffer overflow, integer overflow, and other attacks. */ public class Smb2NegotiateResponseInputValidationTest { private Configuration mockConfig; private Smb2NegotiateResponse response; @BeforeEach
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 15.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/Collections2Test.java
} public void testOrderedPermutationSetSizeOverflow() { // 12 elements won't overflow assertEquals( 479001600 /*12!*/, Collections2.orderedPermutations(newArrayList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) .size()); // 13 elements overflow an int assertEquals( Integer.MAX_VALUE,
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 20.1K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/rdma/RdmaErrorHandler.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 10.5K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java
verifyNoMoreInteractions(mockBuffer); } @Test @DisplayName("Should encode masked overflow value correctly") void testEncodeMaskedValue() throws NdrException { // Given: NdrShort with overflow value that gets masked int inputValue = 300; // 300 & 0xFF = 44 NdrShort ndrShort = new NdrShort(inputValue);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.2K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/BufferCacheSecurityTest.java
import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; /** * Security-focused test cases for BufferCache to verify buffer overflow protection. */ public class BufferCacheSecurityTest { /** * Test that buffer allocation validates size to prevent overflow. */ @Test public void testBufferSizeValidation() { // When - Get a buffer byte[] buffer = BufferCache.getBuffer();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 9.6K bytes - Viewed (0) -
src/test/java/jcifs/EncodableTest.java
} @Test @DisplayName("encode() throws when dstIndex causes overflow") void encodeThrowsWhenDstIndexCausesOverflow() { byte[] src = makeSeq(5); Encodable enc = new ByteEncodable(src, 0, 5); byte[] dst = new byte[6]; // size is 6, but index 2 + len 5 -> overflow assertThrows(ArrayIndexOutOfBoundsException.class, () -> enc.encode(dst, 2),
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
@Override public BigInteger apply(BigInteger x) { return x.negate(); } }; /* * This list contains values that attempt to provoke overflow in integer operations. It contains * positive values on or near 2^N for N near multiples of 8 (near byte boundaries). */ static final ImmutableSet<Integer> POSITIVE_INTEGER_CANDIDATES;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 11.3K bytes - Viewed (0)