diff options
| author | Aaron Buchwald <aaron.buchwald56@gmail.com> | 2020-09-17 09:20:36 -0400 |
|---|---|---|
| committer | Aaron Buchwald <aaron.buchwald56@gmail.com> | 2020-09-17 09:20:36 -0400 |
| commit | 6b4efa7ff5537a7cdb1d73b18dd75f56bdadc032 (patch) | |
| tree | 85da01f5b75788e257d3c355917a4b3a8ad8603b | |
| parent | 8123ec9caeb1917519c1f8f67f386df142578728 (diff) | |
Fix potential nil pointer dereference
| -rw-r--r-- | core/types/block.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/types/block.go b/core/types/block.go index 99d6cc8..0a93601 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -330,6 +330,9 @@ func (b *Block) SetExtraData(data []byte) { } func (b *Block) ExtraData() []byte { + if b.extdata == nil { + return nil + } return *b.extdata } |