sqlmapproject/sqlmap · error · OracleUndecided

integer read failed final equality check: (%s) != %d

Error message

integer read failed final equality check: (%s) != %d

What it means

Error "integer read failed final equality check: (%s) != %d" thrown in sqlmapproject/sqlmap.

Source

Thrown at extra/esperanto/extraction.py:677

                raise OverflowError("integer below minimum -%d" % cap)
            hi, lo = -1, -2
            while lo > -cap and not self._gtNum(expr, lo, HUGE):
                hi, lo = lo, lo * 2
            lo = max(lo, -cap - 1)
        # invariant: expr > lo is True, expr > hi is False -> value is the transition in (lo, hi]
        while hi - lo > 1:
            mid = (lo + hi) // 2
            if self._gtNum(expr, mid, HUGE):
                lo = mid
            else:
                hi = mid
        # FINAL INDEPENDENT CHECK: bisection trusts the comparator, which is only PROVEN on
        # integer literals - a backend/WAF that honours '>' on literals but rewrites it (e.g. to
        # '>=') for scalar-subquery / fn / arithmetic operands would converge off-by-one. Confirm
        # the result with a direct equality against the ACTUAL expression; if it isn't decisively
        # true the read is invalid -> fail closed (never return a silently-wrong count/length/id).
        if not self._ask("(%s)=%d" % (expr, hi)):
            raise OracleUndecided("integer read failed final equality check: (%s) != %d" % (expr, hi))
        return hi

    def extractBytes(self, expr):
        """Extract the exact bytes of a string/blob expression via a hex function.
        Byte-exact and collation-independent (the hex string is ASCII [0-9A-F], so
        whatever compare mode is active reads it cleanly). Returns None if no hex
        function is available on the target."""
        if not self._ensureHexfn():
            return None
        # hex doubles the length; cap by maxbytes (a char can be several bytes),
        # not maxlen
        res = self.extractResult(self.dialect.hexfn[1].format(expr=expr),
                                  _ceiling=self.maxbytes * 2, _verify=False)
        hexstr = res.value
        # STRICT: never clean corruption into believable bytes. reject a non-hex
        # char, odd length, incomplete/truncated pull, or an unresolved marker.
        if hexstr is None or not res.complete or res.truncated or res.warnings:
            return None

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at extra/esperanto/extraction.py:677 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/b5eb504503132cc2. Report an issue: GitHub.