Make parse_name() fail when passed buffer size = 0
Summary:
Currently, if you pass an output buffer size of 0 to parse_name() it will
cause an overflow when checking the output buffer space. This change causes the
function to short-circuit and fail when passed a buffer size of 0 instead.
Also adds a test for this scenario.
Depends on D4418
Test Plan:
ninja check-bitcoin-seeder
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D5091