Skip to content
Snippets Groups Projects
Unverified Commit d6cd18df authored by David Baker's avatar David Baker Committed by GitHub
Browse files

Merge pull request #55 from matrix-org/dbkr/pk_key_length

Fix output buffer length check
parents ed02c217 65d4ac19
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ size_t olm_pk_generate_key(
void * pubkey, size_t pubkey_length,
void * random, size_t random_length
) {
if (pubkey_length < CURVE25519_KEY_LENGTH) {
if (pubkey_length < olm_pk_key_length()) {
decryption->last_error =
OlmErrorCode::OLM_OUTPUT_BUFFER_TOO_SMALL;
return std::size_t(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment