rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str #10341

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:rpcwallet_uv_workaround changing 1 files +2 −1
  1. luke-jr commented at 12:22 AM on May 5, 2017: member

    Without this, building against UniValue 1.0.2 results in:

    wallet/rpcwallet.cpp: In function ‘UniValue getbalance(const JSONRPCRequest&)’:
    wallet/rpcwallet.cpp:732:98: error: taking address of temporary [-fpermissive]
         const std::string* account = request.params[0].get_str() != "*" ? &request.params[0].get_str() : nullptr;
    
  2. rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str a637734ba2
  3. fanquake added the label Wallet on May 5, 2017
  4. ryanofsky commented at 12:39 AM on May 5, 2017: member

    utACK a637734ba22307f6e89857803070f566e736d4a6

  5. jonasschnelli commented at 6:24 AM on May 5, 2017: contributor

    utACK a637734ba22307f6e89857803070f566e736d4a6

  6. paveljanik commented at 9:05 AM on May 5, 2017: contributor

    utACK a637734

  7. MarcoFalke added the label Refactoring on May 5, 2017
  8. theuni commented at 2:17 PM on May 5, 2017: member

    This points out that we don't have a strong enough api contract to support an external UniValue :\

  9. gmaxwell commented at 11:40 PM on May 7, 2017: contributor

    I recommend we instead threshold the univalue version. They have been security issues in older versions... esp since as a library I don't believe it's actually maintained.

  10. jgarzik commented at 11:42 PM on May 7, 2017: contributor

    It is maintained.

  11. laanwj commented at 5:03 PM on May 11, 2017: member

    This makes the code slightly better readable so seems OK to me.

    A minimum threshold for univalue would be a sane thing to do though. I didn't know we supported external univalue at all.

  12. laanwj merged this on May 11, 2017
  13. laanwj closed this on May 11, 2017

  14. laanwj referenced this in commit 18c9debe60 on May 11, 2017
  15. luke-jr deleted the branch on May 11, 2017
  16. PastaPastaPasta referenced this in commit e56a30c898 on Jun 19, 2019
  17. PastaPastaPasta referenced this in commit 0ccd6e1c50 on Jun 19, 2019
  18. PastaPastaPasta referenced this in commit 494a3a3926 on Jun 19, 2019
  19. PastaPastaPasta referenced this in commit 9f02d056ed on Jun 19, 2019
  20. PastaPastaPasta referenced this in commit 7dcff2b5b9 on Jun 19, 2019
  21. PastaPastaPasta referenced this in commit df53c58de2 on Jun 20, 2019
  22. PastaPastaPasta referenced this in commit 529404485c on Jun 22, 2019
  23. PastaPastaPasta referenced this in commit de5f92667c on Jun 22, 2019
  24. PastaPastaPasta referenced this in commit 888b4f1769 on Jun 22, 2019
  25. PastaPastaPasta referenced this in commit 1d2211b652 on Jun 22, 2019
  26. PastaPastaPasta referenced this in commit 864451f810 on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 63db304064 on Jun 24, 2019
  28. barrystyle referenced this in commit 2b43f6aabb on Jan 22, 2020
  29. 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: 2026-04-14 15:15 UTC

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