From 041b93242883dc604f193e912497350f55800ee3 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 10 May 2012 18:04:27 -0500 Subject: [PATCH] mem: fix bug with CopyStringOut and null string termination. --- src/mem/fs_translating_port_proxy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++; } -- 2.30.2