Commit bba65155 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

C++ Dumper: Fix potential endless loop on invalid pointer



Change-Id: I554f2cd0b97c549767453ad3df290d93da483360
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 4058ff6f
......@@ -56,10 +56,15 @@ def readTemplateName(d, value):
impl = args["_M_impl"]
start = impl["_M_start"]
size = impl["_M_finish"] - start
for i in range(int(size)):
if i > 0:
name += ", "
name += extractPointerType(d, d.downcast(start[i]["_type"]))
try:
d.check(0 <= size and size <= 100)
d.checkPointer(start)
for i in range(int(size)):
if i > 0:
name += ", "
name += extractPointerType(d, d.downcast(start[i]["_type"]))
except:
return "<not accessible>"
name += ">"
return name
......
Supports Markdown
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