Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 143 for Overflow (0.67 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/main/webapp/css/style.css

    		width: 200px;
    	}
    	.searchFormBox {
    		margin-top: 4em;
    	}
    	#result .info {
    		display: none;
    	}
    	#result .more {
    		display: block;
    	}
    	#result .description {
    		overflow: hidden;
    		text-overflow: ellipsis;
    		white-space: nowrap;
    	}
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sun Jan 12 06:14:02 UTC 2025
    - 2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/rdma/RdmaErrorHandler.java

                try {
                    // Exponential backoff with overflow protection - ensure safe calculation
                    if (retryDelayMs > 0) {
                        // Safe calculation preventing overflow: use Math.max(0, retryCount - 1) and limit shift
                        int safeShift = Math.min(MAX_BACKOFF_SHIFT, Math.max(0, retryCount - 1));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/idn/Punycode.kt

          val increment = (m - n) * (h + 1)
          if (delta > Int.MAX_VALUE - increment) return false // Prevent overflow.
          delta += increment
    
          n = m
    
          for (c in input) {
            if (c < n) {
              if (delta == Int.MAX_VALUE) return false // Prevent overflow.
              delta++
            } else if (c == n) {
              var q = delta
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/MathPreconditions.java

        if (!condition) {
          throw new ArithmeticException("overflow: " + methodName + "(" + a + ", " + b + ")");
        }
      }
    
      static void checkNoOverflow(boolean condition, String methodName, long a, long b) {
        if (!condition) {
          throw new ArithmeticException("overflow: " + methodName + "(" + a + ", " + b + ")");
        }
      }
    
      private MathPreconditions() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. 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)
Back to top