mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 09:55:49 +02:00
Check size after Unserializing CPubKey
This commit is contained in:
@@ -142,6 +142,9 @@ public:
|
||||
unsigned int len = ::ReadCompactSize(s);
|
||||
if (len <= SIZE) {
|
||||
s.read((char*)vch, len);
|
||||
if (len != size()) {
|
||||
Invalidate();
|
||||
}
|
||||
} else {
|
||||
// invalid pubkey, skip available data
|
||||
char dummy;
|
||||
|
||||
Reference in New Issue
Block a user