mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
whisper: Allocate the full topic length in the copy
This is so that the partial topic code (currently disabled) does not crash when trying to access byte #3,
This commit is contained in:
parent
563643e66f
commit
0fb9691705
1 changed files with 1 additions and 1 deletions
|
|
@ -560,7 +560,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) {
|
|||
if len(req.Topics) > 0 {
|
||||
topics = make([][]byte, len(req.Topics))
|
||||
for i, topic := range req.Topics {
|
||||
topics[i] = make([]byte, len(topic))
|
||||
topics[i] = make([]byte, TopicLength)
|
||||
copy(topics[i], topic[:])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue