mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Check size after Unserializing CPubKey
This commit is contained in:
parent
6762a627ec
commit
9b8907fade
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue