Improve check that user supplied memo field is too long.
This commit is contained in:
parent
e79ded8a47
commit
6114cfe767
|
@ -3242,8 +3242,7 @@ Value z_sendmany(const Array& params, bool fHelp)
|
|||
} else if (!IsHex(memo)) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected memo data in hexadecimal format.");
|
||||
}
|
||||
std::vector<unsigned char> vMemo = ParseHex(memo);
|
||||
if (vMemo.size() > ZC_MEMO_SIZE) {
|
||||
if (memo.length() > ZC_MEMO_SIZE*2) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, size of memo is larger than maximum allowed %d", ZC_MEMO_SIZE ));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue