sqlmapproject/sqlmap · error · OverflowError

integer exceeds maximum %d

Error message

integer exceeds maximum %d

What it means

Error "integer exceeds maximum %d" thrown in sqlmapproject/sqlmap.

Source

Thrown at extra/esperanto/extraction.py:639

        return self._ask("(%s)=(%s)" % (left, right))

    def extractInteger(self, expr, maximum=None):
        """Extract a (possibly signed) integer by range-bounded bisection - avoids
        stringifying and reading digit-by-digit. EVERY numeric decision renders through
        `_gtNum` (the discovered comparator: gt / BETWEEN / operator-free rung), so it
        never emits a raw '>='/'<'/'>' discovery did not validate, and an operator-free
        rung keeps FULL signed range (not the membership magnitude ceiling)."""
        cap = maximum if maximum is not None else 1 << 62
        if not self._numDefined(expr):
            return None
        if self._comparator == "membership":
            # no ordered comparator at all: read the non-negative magnitude (counts /
            # lengths) via the bounded IN/scan window; out-of-range -> overflow.
            ceil = min(cap, 1 << 16)
            try:
                return self._readNum(expr, 0, ceil)
            except NumericOutOfRange:
                raise OverflowError("integer exceeds maximum %d" % ceil)
        # ordered comparator: bracket the value with `expr > n` probes then bisect the
        # transition. The `high` arg to _gtNum MUST exceed any possible value (BETWEEN renders
        # `expr BETWEEN n+1 AND high`; using `cap` there made every over-cap positive read as
        # an empty range -> misclassified NEGATIVE, reporting "below minimum" for an above-max
        # value). Use HUGE as the range ceiling everywhere; `cap` is only the overflow threshold.
        HUGE = 1 << 62
        if self._gtNum(expr, -1, HUGE):                 # expr > -1  <=>  expr >= 0 (any magnitude)
            if self._gtNum(expr, cap, HUGE):            # expr > cap  -> ABOVE maximum
                raise OverflowError("integer exceeds maximum %d" % cap)
            lo, hi = -1, 1
            while hi < cap and self._gtNum(expr, hi, HUGE):
                lo, hi = hi, min(hi * 2 + 1, cap)
        else:                                           # not in [0, HUGE]
            # BETWEEN's sign test caps at HUGE, so a positive value ABOVE HUGE also lands here.
            # distinguish it from a genuine negative before reporting a direction (a gt/operator-
            # free sign test is unbounded, so its else-branch is truly negative and skips this).
            if self._comparator == "between" and not self._ask("(%s) BETWEEN %d AND %d" % (expr, -HUGE, -1)):
                raise OverflowError("integer magnitude exceeds representable range (+/-%d), direction unknown" % HUGE)

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at extra/esperanto/extraction.py:639 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/e8ba63650e6f747c. Report an issue: GitHub.