Edited to fix issue #1071 (#1664)

This commit is contained in:
pjot726
2019-08-13 11:13:56 -07:00
committed by Derek Parker
parent 440aa31bc6
commit a621034bcf

View File

@ -103,6 +103,9 @@ func (r *SplicedMemory) ReadMemory(buf []byte, addr uintptr) (n int, err error)
return n, fmt.Errorf("hit unmapped area at %v after %v bytes", addr, n)
}
// The reading of the memory has been started after the first iteration
started = true
// Don't go past the region.
pb := buf
if addr+uintptr(len(buf)) > entry.offset+entry.length {