diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-08-07 23:00:01 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-08-09 01:37:16 +0200 |
commit | 216e9a4456207f5ae9cd85926521851e11a26d92 (patch) | |
tree | b85c0cd6d085ca32de8122c286cfeb4c8544c19c /src/wallet.h | |
parent | 003bbd5f7672d7fd4f40478fd57cc4e03c30f933 (diff) |
Add a way to limit deserialized string lengths
and use it for most strings being serialized.
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet.h b/src/wallet.h index 73fcfa24e0..864a635ec7 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -858,7 +858,7 @@ public: READWRITE(vchPrivKey); READWRITE(nTimeCreated); READWRITE(nTimeExpires); - READWRITE(strComment); + READWRITE(LIMITED_STRING(strComment, 65536)); ) }; @@ -933,7 +933,7 @@ public: // Note: strAccount is serialized as part of the key, not here. READWRITE(nCreditDebit); READWRITE(nTime); - READWRITE(strOtherAccount); + READWRITE(LIMITED_STRING(strOtherAccount, 65536)); if (!fRead) { @@ -949,7 +949,7 @@ public: } } - READWRITE(strComment); + READWRITE(LIMITED_STRING(strComment, 65536)); size_t nSepPos = strComment.find("\0", 0, 1); if (fRead) |