core#19077 [18/26]
> Determine wallet file type based on file magic
https://github.com/bitcoin/bitcoin/pull/19077/commits/ac38a87225be0f1103ff9629d63980550d2f372b
core#20216
> wallet: fix buffer over-read in SQLite file magic check
>
> If there is no terminating zero within the 16 magic bytes, the buffer would be
> over-read in the std::string constructor. Fixed by using the "from buffer"
> variant of the constructor (that also takes a size) rather than the "from c-string"
> variant.
https://github.com/bitcoin/bitcoin/pull/20216/commits/56a461f72796ca60de28e78f144741eb1a4f5213
This is a backport of core#19077 [18/26] and core#20216
At this point, the new code is not reachable by users.
Depends on D10565