netbase: Use .data() instead of .c_str() on binary string #4868

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2014_09_cstr changing 8 files +10 −10
  1. laanwj commented at 10:27 AM on September 8, 2014: member

    .c_str() is only guaranteed to return the data up to the first NUL character. This could break Socks5 negotiation on some platforms.

    Also remove a few redundant c_str() in logging and formatting.

  2. netbase: Use .data() instead of .c_str() on binary string
    `.c_str()` is only guaranteed to return the data up to the first NUL
    character.
    f7d0a86bf6
  3. laanwj force-pushed on Sep 8, 2014
  4. laanwj cross-referenced this on Sep 8, 2014 from issue netbase: Make SOCKS5 negotiation interruptible by laanwj
  5. sipa commented at 12:59 PM on September 8, 2014: member

    ut ACK

  6. jgarzik commented at 1:08 PM on September 8, 2014: contributor

    ut ACK

  7. Diapolo commented at 2:03 PM on September 8, 2014: none

    ut ACT

    Always good to remove .c_str() where not needed.

  8. laanwj commented at 7:55 AM on September 9, 2014: member

    @Diapolo I'm sure you mean #4879. Mind if I just merge those into here, to cut down in the number of c_str related pulls?

  9. Diapolo commented at 8:03 AM on September 9, 2014: none

    @laanwj Yeah just do that :).

  10. laanwj force-pushed on Sep 9, 2014
  11. laanwj cross-referenced this on Sep 9, 2014 from issue core: remove unneeded c_str() / Qt: replace c_str() with Qt code by Diapolo
  12. Remove some unnecessary c_strs() in logging and the GUI
    Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code`
    by P. Kaufmann.
    2c2cc5dac1
  13. laanwj force-pushed on Sep 9, 2014
  14. BitcoinPullTester commented at 9:46 AM on September 9, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4868_2c2cc5dac1102c1eb86c7dd825a893ab388abba1/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  15. sipa merged this on Sep 9, 2014
  16. sipa closed this on Sep 9, 2014

  17. sipa referenced this in commit 1575c5171f on Sep 9, 2014
  18. bitcoin 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-05-19 06:55 UTC