Page MenuHomePhabricator

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

Authored by nakihito on Aug 21 2019, 23:00.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Aug 21 2019, 23:00
nakihito edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Aug 26 2019, 07:15