mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Potentially fixes #5934
This commit is contained in:
@@ -116,15 +116,16 @@ class BigArray(list):
|
||||
self.append(_)
|
||||
|
||||
def pop(self):
|
||||
if len(self.chunks[-1]) < 1:
|
||||
self.chunks.pop()
|
||||
try:
|
||||
with open(self.chunks[-1], "rb") as f:
|
||||
self.chunks[-1] = pickle.loads(zlib.decompress(f.read()))
|
||||
except IOError as ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
raise SqlmapSystemException(errMsg)
|
||||
with self._lock:
|
||||
if not self.chunks[-1] and len(self.chunks) > 1:
|
||||
self.chunks.pop()
|
||||
try:
|
||||
with open(self.chunks[-1], "rb") as f:
|
||||
self.chunks[-1] = pickle.loads(zlib.decompress(f.read()))
|
||||
except IOError as ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
raise SqlmapSystemException(errMsg)
|
||||
|
||||
return self.chunks[-1].pop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user