From 25133bd74b75825e8f2ddf551ca09f4537b73a0f Mon Sep 17 00:00:00 2001 From: Venkatesh Srinivas Date: Sun, 7 Aug 2011 12:19:14 -0400 Subject: 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 --- src/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 78055bfc69..6678e566a7 100644 --- a/src/net.h +++ b/src/net.h @@ -66,7 +66,7 @@ bool StopNode(); // (4) size // (4) checksum -extern char pchMessageStart[4]; +extern unsigned char pchMessageStart[4]; class CMessageHeader { -- cgit v1.2.3