HomePhabricator

Use 'unsigned char' rather than 'char' for pchMessageStart.
25133bd74b75Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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>

Details

Provenance
Venkatesh Srinivas <me@endeavour.zapto.org>Authored on Aug 7 2011, 16:19
Jeff Garzik <jgarzik@pobox.com>Committed on Aug 11 2011, 02:42
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGINGeb20f3c8f525: Merge pull request #448 from sipa/cbitcoinaddress
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff Garzik <jgarzik@pobox.com> committed rSTAGING25133bd74b75: Use 'unsigned char' rather than 'char' for pchMessageStart. (authored by Venkatesh Srinivas <me@endeavour.zapto.org>).Aug 11 2011, 02:42