Check size after Unserializing CPubKey

This commit is contained in:
Elichai Turkel 2020-06-10 17:34:28 +03:00
parent 6762a627ec
commit 9b8907fade
No known key found for this signature in database
GPG key ID: 9383CDE9E8E66A7F

View file

@ -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;