From df78a294e483add743d79f41aed17c9ffd74933e Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Thu, 7 May 2015 09:34:34 -0500 Subject: [PATCH] Protect against null strings --- proctl/variables.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proctl/variables.go b/proctl/variables.go index b098beee..e9131d8a 100644 --- a/proctl/variables.go +++ b/proctl/variables.go @@ -757,6 +757,9 @@ func (thread *ThreadContext) readString(addr uintptr) (string, error) { return "", err } addr = uintptr(binary.LittleEndian.Uint64(val)) + if addr == 0 { + return "", nil + } val, err = thread.readMemory(addr, strlen) if err != nil {