HomePhabricator

net: Avoid using C-style NUL-terminated strings in the netbase interface

Description

net: Avoid using C-style NUL-terminated strings in the netbase interface

Summary:

Don't allow resolving of std::string:s with embedded NUL characters.
Avoid using C-style NUL-terminated strings as arguments in the netbase interface
Add tests.

This is a backport of PR17754 [1/3]
https://github.com/bitcoin/bitcoin/pull/17754/commits/9574de86ad703ad942cdd0eca79f48c0d42b102b

Test Plan: ninja && ninja check

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Dec 11 2019, 16:39
PiRKCommitted on Dec 17 2020, 16:14
PiRKPushed on Dec 17 2020, 16:14
Reviewer
Restricted Project
Differential Revision
D8684: net: Avoid using C-style NUL-terminated strings in the netbase interface
Parents
rABC68e9a6659ebf: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown