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. sipa commented at 12:59 PM on September 8, 2014: member

    ut ACK

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

    ut ACK

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

    ut ACT

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

  7. 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?

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

    @laanwj Yeah just do that :).

  9. laanwj force-pushed on Sep 9, 2014
  10. 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
  11. laanwj force-pushed on Sep 9, 2014
  12. 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.

  13. sipa merged this on Sep 9, 2014
  14. sipa closed this on Sep 9, 2014

  15. sipa referenced this in commit 1575c5171f on Sep 9, 2014
  16. MarcoFalke 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-13 15:15 UTC

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