Skip to content

Commit

Permalink
buflen isnt always oqsxkey->privkeylen_cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
feventura committed Mar 7, 2024
1 parent 0aed78d commit f07a821
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions oqsprov/oqs_encode_key2any.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,7 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder)
memcpy(buf + oqsxkey->privkeylen_cmp[i],
oqsxkey->comp_pubkey[i], oqsxkey->pubkeylen_cmp[i]);
} else {
memcpy(buf, oqsxkey->comp_privkey[i],
oqsxkey->privkeylen_cmp[i]);
memcpy(buf, oqsxkey->comp_privkey[i], buflen);
}

if (nid == EVP_PKEY_EC) {
Expand Down

0 comments on commit f07a821

Please sign in to comment.