mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-04 00:02:01 -04:00
Fix overflow in example_sig_stfl (credit @wangweij) (#1887)
Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
This commit is contained in:
parent
4f8c9e2c67
commit
fc2264d150
@ -67,7 +67,7 @@ static OQS_STATUS stfl_example(char *method_name) {
|
||||
* Allocate storage for public key, secret key filename, message and signature
|
||||
*/
|
||||
public_key = malloc(sig->length_public_key);
|
||||
sk_fname = malloc(strlen(method_name) + strlen(".sk"));
|
||||
sk_fname = malloc(strlen(method_name) + strlen(".sk") + 1);
|
||||
message = malloc(message_len);
|
||||
signature = malloc(sig->length_signature);
|
||||
if ((public_key == NULL) || (message == NULL) || (signature == NULL) || (sk_fname == NULL)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user