Skip to content

Commit a56a6b1

Browse files
committed
Fixes #6107
1 parent 1ee368f commit a56a6b1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.10.9.4"
23+
VERSION = "1.10.9.5"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/techniques/blind/inference.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
from lib.core.settings import INFERENCE_NOT_EQUALS_CHAR
6868
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
6969
from lib.core.settings import MAX_BISECTION_LENGTH
70+
from lib.core.settings import MAX_INT
7071
from lib.core.settings import MAX_REVALIDATION_STEPS
7172
from lib.core.settings import NULL
7273
from lib.core.settings import PARTIAL_HEX_VALUE_MARKER
@@ -864,7 +865,9 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
864865
# elements we use a xrange, which is a virtual
865866
# list
866867
if expand and shiftTable:
867-
charTbl = xrange(maxChar + 1, (maxChar + 1) << shiftTable.pop())
868+
# Cap the expansion so its length never exceeds what len() can report
869+
# (a run of all-true probes would otherwise overflow on 32-bit builds)
870+
charTbl = xrange(maxChar + 1, min((maxChar + 1) << shiftTable.pop(), maxChar + 1 + MAX_INT))
868871
originalTbl = xrange(charTbl[0], charTbl[-1] + 1)
869872
maxChar = maxValue = charTbl[-1]
870873
minValue = charTbl[0]

0 commit comments

Comments
 (0)