[walletdb] Fix syntax error in key parser #7381

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1601-walletdbKeyparserFix changing 1 files +1 −1
  1. MarcoFalke commented at 9:06 am on January 20, 2016: member

    This needs backport to all versions of bitcoin/altcoins after merge.

    A dump may look like:

    0VERSION=3
    1format=bytevalue
    2database=main
    3type=btree
    4db_pagesize=4096
    5HEADER=END
    6<{Data}>
    7DATA=END
    

    So the current parser gives us odd data like:

    keyHex="DATA=END"; valueHex="";

    (sometimes the other way round)

  2. [walletdb] Fix syntax error in key parser fa6d4cc095
  3. jonasschnelli added the label Wallet on Jan 20, 2016
  4. in src/wallet/db.cpp: in fa6d4cc095
    204@@ -205,7 +205,7 @@ bool CDBEnv::Salvage(const std::string& strFile, bool fAggressive, std::vector<C
    205     std::string keyHex, valueHex;
    206     while (!strDump.eof() && keyHex != "DATA=END") {
    207         getline(strDump, keyHex);
    208-        if (keyHex != "DATA_END") {
    209+        if (keyHex != "DATA=END") {
    


    laanwj commented at 9:49 am on January 20, 2016:
    Where does this value come from? If from berkeleydb itself: Is it documented, or available as some kind of constant?


    dcousens commented at 9:05 pm on January 20, 2016:
    We could probably make it a constant for our sakes anyway.
  5. laanwj commented at 10:49 am on January 20, 2016: member
    Fixes #7379 I suppose?
  6. laanwj commented at 10:53 am on January 20, 2016: member
    utACK
  7. laanwj added the label Bug on Jan 20, 2016
  8. laanwj added the label Priority High on Jan 20, 2016
  9. laanwj added this to the milestone 0.12.0 on Jan 20, 2016
  10. laanwj merged this on Jan 20, 2016
  11. laanwj closed this on Jan 20, 2016

  12. laanwj referenced this in commit 545c5f920e on Jan 20, 2016
  13. laanwj referenced this in commit 621bbd88ba on Jan 20, 2016
  14. MarcoFalke deleted the branch on Jan 20, 2016
  15. laanwj referenced this in commit c40ec14210 on Jan 20, 2016
  16. laanwj referenced this in commit b0c97ce31a on Jan 20, 2016
  17. MarcoFalke commented at 12:10 pm on January 20, 2016: member

    Fixes #7379 I suppose?

    There are other issues with salvagewallet, so I can’t guarantee that.

  18. laanwj commented at 12:13 pm on January 20, 2016: member
    • Backported to 0.12 as 621bbd88baf7e8f50a015905070e19f71a53f8b9
    • Backported to 0.11 as c40ec1421048e7ddb9eb1878e4c65ff27aa066c8
    • Backported to 0.10 as b0c97ce31a93caa0037c67a0dc133b8873911070
  19. laanwj commented at 12:22 pm on January 20, 2016: member

    There are other issues with salvagewallet, so I can’t guarantee that.

    Right, I meant the specific problem. It’s never possible to guarantee that you’ve solved all bugs. If only…

  20. jonasschnelli commented at 12:30 pm on January 20, 2016: contributor
    Nice catch! Thanks for fixing. Post merge ACK.
  21. dexX7 referenced this in commit e9f4ff787b on Apr 24, 2016
  22. reddink referenced this in commit 797cb84bd2 on May 27, 2020
  23. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me