HomePhabricator

Merge #11193: [Qt] Terminate string *pszExePath after readlink and without…

Description

Merge #11193: [Qt] Terminate string *pszExePath after readlink and without using memset

Summary:
3a4401a [Qt] Terminate string *pszExePath after readlink and without using memset (practicalswift)

Pull request description:

Terminate string `*pszExePath` after `readlink` and before passing to operator `<<`.

* `ssize_t readlink(const char *pathname, char *buf, size_t bufsiz)` does not append a null byte to `buf`.
* Operator `<<` expects a null-terminated string.

Tree-SHA512: fc18844bb23059fead8db0cb9b4b4ba6188f58e3f19ab4719c2737cc5dd6df23ae7d4804ef2820d39b334204a48ee3de1d202c272bcd156e60761af2fcb9349d

Backport of Core PR11193
https://github.com/bitcoin/bitcoin/pull/11193/

Test Plan:

make check
./bitcoin-qt

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Oct 2 2017, 13:04
nakihitoCommitted on Aug 26 2019, 18:42
nakihitoPushed on Aug 26 2019, 18:42
Reviewer
Restricted Owners Package
Differential Revision
D3933: Merge #11193: [Qt] Terminate string *pszExePath after readlink and without using memset
Parents
rABC7b0d5028a6b5: use base58 map instead of strchr()
Branches
Unknown
Tags
Unknown