mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 04:36:29 +08:00
Protect against null strings
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user