Debugger: Fix #12291.

UiUtils:
- Fix incorrect check to see if we had hit the bounds of the current memory
  block that would cause us to overflow the block's data buffer if incorrect
  length values were passed in.
This commit is contained in:
Rene Gollent
2015-08-06 17:51:15 -04:00
parent 33c0e857dc
commit 08c57f1d3b
@@ -337,6 +337,9 @@ UiUtils::DumpMemory(BString& _output, int32 indentLevel,
int32 j;
_output.Append('\t', indentLevel);
for (int32 i = 0; i < count; i++) {
if (!block->Contains(address + i * itemSize))
break;
uint8* value;
if ((i % displayWidth) == 0) {
@@ -350,8 +353,6 @@ UiUtils::DumpMemory(BString& _output, int32 indentLevel,
_output += data;
char c;
for (j = 0; j < displayed; j++) {
if (!block->Contains(address + displayed))
break;
c = *(block->Data() + address - block->BaseAddress()
+ (i * itemSize) + j);
if (!isprint(c))