Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overflow in stateful sigs tests #1887

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/example_sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Loading