From 6b4efa7ff5537a7cdb1d73b18dd75f56bdadc032 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Thu, 17 Sep 2020 09:20:36 -0400 Subject: Fix potential nil pointer dereference --- core/types/block.go | 3 +++ 1 file changed, 3 insertions(+) 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 } -- cgit v1.2.3-70-g09d2