We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53eb559 commit 5a5d26dCopy full SHA for 5a5d26d
src/psbt.h
@@ -520,6 +520,11 @@ struct PSBTInput
520
std::vector<unsigned char> sig;
521
s >> sig;
522
523
+ // Check that the signature is validly encoded
524
+ if (sig.empty() || !CheckSignatureEncoding(sig, SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_STRICTENC, nullptr)) {
525
+ throw std::ios_base::failure("Signature is not a valid encoding");
526
+ }
527
+
528
// Add to list
529
partial_sigs.emplace(pubkey.GetID(), SigPair(pubkey, std::move(sig)));
530
break;
0 commit comments