summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:27 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:27 -0500
commit041b93242883dc604f193e912497350f55800ee3 (patch)
treeb82db6cf2614d0dce6c1db657ae73e7a21760e07
parentc02dc074248717ad6dd6f397f5124f97094f7a20 (diff)
downloadgem5-041b93242883dc604f193e912497350f55800ee3.tar.xz
mem: fix bug with CopyStringOut and null string termination.
-rw-r--r--src/mem/fs_translating_port_proxy.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/fs_translating_port_proxy.cc b/src/mem/fs_translating_port_proxy.cc
index bf0c076c6..9f1f7d019 100644
--- a/src/mem/fs_translating_port_proxy.cc
+++ b/src/mem/fs_translating_port_proxy.cc
@@ -140,7 +140,7 @@ CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
bool foundNull = false;
while ((dst - start + 1) < maxlen && !foundNull) {
vp.readBlob(vaddr++, (uint8_t*)dst, 1);
- if (dst == '\0')
+ if (*dst == '\0')
foundNull = true;
dst++;
}