diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-03-13 18:26:45 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-03-13 18:39:55 +0100 |
commit | af88094e4f715ae2dc71d8868b3c734525bcc274 (patch) | |
tree | 517fdd58f1f92fad7d3be2aa9bf6142445d23209 /src/qt | |
parent | 702e8b70bd870f506ce8157e58b77cb7d0a0f98d (diff) | |
parent | 42343c748c2bca8ba9b888d949088dbfd1f142b4 (diff) |
Merge #12658: Sanitize some wallet serialization
42343c748 Split up and sanitize CAccountingEntry serialization (Pieter Wuille)
029ecac1b Split up and sanitize CWalletTx serialization (Pieter Wuille)
Pull request description:
This is a small subset of changes taken from #10785, fixing a few of the craziest constness violations in the serialization code.
`CWalletTx` currently serializes some of its fields by embedding them in a key-value `mapValue`, which is modified (and then fixed up) even from the `Serialize` method (for which `mapValue` is const). `CAccountingEntry` goes even further in that it stores such a map by appending it into `strComment` after a null char, which is again later fixed up again.
Fix this by splitting the serialization and deserialization code, and making the serialization act on a copy of `mapValue` / `strComment`.
Tree-SHA512: 487e04996dea6aba5b9b8bdaf2c4e680808f111a15afc557b8d078e14b01e4f40f8ef27588869be62f9a87052117c17e0a0c26c59150f83472a9076936af035e
Diffstat (limited to 'src/qt')
0 files changed, 0 insertions, 0 deletions