Fix SSL_CTX_set1_sigalgs_list fuzzer.
SSL_CTX_set1_sigalgs_list wants a NUL-terminated string, so we need to use GetString to give it one. Bug: oss-fuzz:9808 Change-Id: Id7f676aa514c36de9dea900763db3cbbf5c79a4c Reviewed-on: https://boringssl-review.googlesource.com/30804 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
17dc94e874
commit
ddedf6d455
@ -479,7 +479,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
|
||||
SSL_CTX_set1_sigalgs(ctx, (const int *)CBS_data(cbs), CBS_len(cbs) / 2);
|
||||
},
|
||||
[](SSL_CTX *ctx, CBS *cbs) {
|
||||
SSL_CTX_set1_sigalgs_list(ctx, (const char *) CBS_data(cbs));
|
||||
std::string sigalgs;
|
||||
if (!GetString(&sigalgs, cbs)) {
|
||||
return;
|
||||
}
|
||||
SSL_CTX_set1_sigalgs_list(ctx, sigalgs.c_str());
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user