{"record":{"id":"0713a68ad028951d","repo":"sqlmapproject/sqlmap","slug":"integer-magnitude-exceeds-representable-range","errorCode":null,"errorMessage":"integer magnitude exceeds representable range (+/-%d), direction unknown","messagePattern":"integer magnitude exceeds representable range \\(\\+/-(.+?)\\), direction unknown","errorType":"exception","errorClass":"OverflowError","httpStatus":null,"severity":"error","filePath":"extra/esperanto/extraction.py","lineNumber":657,"sourceCode":"                raise OverflowError(\"integer exceeds maximum %d\" % ceil)\n        # ordered comparator: bracket the value with `expr > n` probes then bisect the\n        # transition. The `high` arg to _gtNum MUST exceed any possible value (BETWEEN renders\n        # `expr BETWEEN n+1 AND high`; using `cap` there made every over-cap positive read as\n        # an empty range -> misclassified NEGATIVE, reporting \"below minimum\" for an above-max\n        # value). Use HUGE as the range ceiling everywhere; `cap` is only the overflow threshold.\n        HUGE = 1 << 62\n        if self._gtNum(expr, -1, HUGE):                 # expr > -1  <=>  expr >= 0 (any magnitude)\n            if self._gtNum(expr, cap, HUGE):            # expr > cap  -> ABOVE maximum\n                raise OverflowError(\"integer exceeds maximum %d\" % cap)\n            lo, hi = -1, 1\n            while hi < cap and self._gtNum(expr, hi, HUGE):\n                lo, hi = hi, min(hi * 2 + 1, cap)\n        else:                                           # not in [0, HUGE]\n            # BETWEEN's sign test caps at HUGE, so a positive value ABOVE HUGE also lands here.\n            # distinguish it from a genuine negative before reporting a direction (a gt/operator-\n            # free sign test is unbounded, so its else-branch is truly negative and skips this).\n            if self._comparator == \"between\" and not self._ask(\"(%s) BETWEEN %d AND %d\" % (expr, -HUGE, -1)):\n                raise OverflowError(\"integer magnitude exceeds representable range (+/-%d), direction unknown\" % HUGE)\n            if not self._gtNum(expr, -cap - 1, HUGE):   # expr <= -cap-1 -> BELOW minimum\n                raise OverflowError(\"integer below minimum -%d\" % cap)\n            hi, lo = -1, -2\n            while lo > -cap and not self._gtNum(expr, lo, HUGE):\n                hi, lo = lo, lo * 2\n            lo = max(lo, -cap - 1)\n        # invariant: expr > lo is True, expr > hi is False -> value is the transition in (lo, hi]\n        while hi - lo > 1:\n            mid = (lo + hi) // 2\n            if self._gtNum(expr, mid, HUGE):\n                lo = mid\n            else:\n                hi = mid\n        # FINAL INDEPENDENT CHECK: bisection trusts the comparator, which is only PROVEN on\n        # integer literals - a backend/WAF that honours '>' on literals but rewrites it (e.g. to\n        # '>=') for scalar-subquery / fn / arithmetic operands would converge off-by-one. Confirm\n        # the result with a direct equality against the ACTUAL expression; if it isn't decisively\n        # true the read is invalid -> fail closed (never return a silently-wrong count/length/id).","sourceCodeStart":639,"sourceCodeEnd":675,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/esperanto/extraction.py#L639-L675","documentation":"Error \"integer magnitude exceeds representable range (+/-%d), direction unknown\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/esperanto/extraction.py:657 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}