changeset 8601533b6f70 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8601533b6f70
description:
        mem: fix bug with CopyStringOut and null string termination.

diffstat:

 src/mem/fs_translating_port_proxy.cc |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a029d2119487 -r 8601533b6f70 src/mem/fs_translating_port_proxy.cc
--- a/src/mem/fs_translating_port_proxy.cc      Thu May 10 18:04:27 2012 -0500
+++ b/src/mem/fs_translating_port_proxy.cc      Thu May 10 18:04:27 2012 -0500
@@ -140,7 +140,7 @@
     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++;
     }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to