test: Replace remaining sprintf with snprintf
Summary:
Use of sprintf is seen as a red flag as many of its uses are insecure.
OpenBSD warns about it while compiling, and some modern platforms, e.g.
cloudlibc from cloudabi don't
even provide it anymore.
Backport of core PR9867
Test Plan:
make check
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, deadalnix, jasonbcox
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2697