Commit cc765e9f authored by David Schulz's avatar David Schulz
Browse files

Debugger: Raise exception for invalid memory



The api doesn't expect empty arrays and doesn't validate indices
before accessing them.

Change-Id: I6d6fde9eec6d65d5db351be821fed892a77fabc1
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent eefe4fb7
......@@ -241,7 +241,10 @@ class Dumper(DumperBase):
self.report('result={%s}' % (result))
def readRawMemory(self, address, size):
return cdbext.readRawMemory(address, size)
mem = cdbext.readRawMemory(address, size)
if len(mem) != size:
raise Exception("Invalid memory request")
return mem
def findStaticMetaObject(self, typeName):
ptr = self.findValueByExpression('&' + typeName + '::staticMetaObject')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment