HomePhabricator

Work around memory-aliasing in descriptor ParsePubkey

Description

Work around memory-aliasing in descriptor ParsePubkey

Summary:
Having a.size()==0 and then access a[0] is undefined behavior.

Add Span::empty() and use it in script/descriptor

This is a backport of core#19508

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9714

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jul 13 2020, 20:00
PiRKCommitted on Jun 30 2021, 14:32
PiRKPushed on Jun 30 2021, 14:32
Reviewer
Restricted Project
Differential Revision
D9714: Work around memory-aliasing in descriptor ParsePubkey
Parents
rABC059cb21cc8b3: Fix the fuzzer for FormatVersion and FormatUserAgent
Branches
Unknown
Tags
Unknown