mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd:Ⓜ️:vm: Fix b64 buffer size calc; minor cleanup.
This commit is contained in:
parent
ebed17d9d0
commit
5a744debe2
1 changed files with 3 additions and 3 deletions
|
@ -114,19 +114,19 @@ ircd::m::vm::commit(json::iov &event,
|
|||
assert(self::public_key.verify(preimage, sig));
|
||||
}
|
||||
|
||||
char sigb64[64];
|
||||
char sigb64[size_t(size(sig) * 1.34) + 1];
|
||||
const json::members sigs
|
||||
{
|
||||
{ my_host(), json::members
|
||||
{
|
||||
json::member { self::public_key_id, b64encode_unpadded(sigb64, sig) }
|
||||
{ self::public_key_id, b64encode_unpadded(sigb64, sig) }
|
||||
}}
|
||||
};
|
||||
|
||||
const json::iov::push _final[]
|
||||
{
|
||||
{ event, { "content", content }},
|
||||
{ event, { "signatures", sigs }},
|
||||
{ event, { "content", content }},
|
||||
};
|
||||
|
||||
return commit(event);
|
||||
|
|
Loading…
Reference in a new issue