Use 'unsigned char' rather than 'char' for pchMessageStart. #459

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:char-msgstart changing 2 files +2 −2
  1. jgarzik commented at 2:45 AM on August 11, 2011: contributor

    Regarding https://bitcointalk.org/index.php?topic=28022.0

    main.cpp has: "char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };" Per discussion on the thread linked, leaving the signedness of pchMessageStart is unsafe for values > 0x80. This patch specifies 'unsigned char' in main.cpp and net.h.

  2. Use 'unsigned char' rather than 'char' for pchMessageStart.
    Regarding https://bitcointalk.org/index.php?topic=28022.0
    
    main.cpp has: "char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };"
    Per discussion on the thread linked, leaving the signedness of
    pchMessageStart is unsafe for values > 0x80. This patch specifies
    'unsigned char' in main.cpp and net.h.
    
    Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
    25133bd74b
  3. gavinandresen referenced this in commit c648b589be on Aug 11, 2011
  4. gavinandresen merged this on Aug 11, 2011
  5. gavinandresen closed this on Aug 11, 2011

  6. jgarzik deleted the branch on Aug 24, 2014
  7. MarcoFalke referenced this in commit fd86f998fc on Sep 29, 2017
  8. HashUnlimited referenced this in commit 74db3b0e3c on Mar 12, 2018
  9. lateminer referenced this in commit 79e7a13b07 on Jan 22, 2019
  10. fjahr referenced this in commit f532bdc9f7 on Jul 24, 2019
  11. rajarshimaitra referenced this in commit d2d04a726c on Aug 5, 2021
  12. DrahtBot locked this on Sep 8, 2021
Contributors

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-20 00:16 UTC

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