projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c02dc07
)
mem: fix bug with CopyStringOut and null string termination.
author
Ali Saidi
<Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:27 +0000
(18:04 -0500)
committer
Ali Saidi
<Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:27 +0000
(18:04 -0500)
src/mem/fs_translating_port_proxy.cc
patch
|
blob
|
history
diff --git
a/src/mem/fs_translating_port_proxy.cc
b/src/mem/fs_translating_port_proxy.cc
index bf0c076c6d94f9260404d4bb2e3358762b536b98..9f1f7d019d5cad5ffa072d2afbb859ac5ba97231 100644
(file)
--- 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++;
}