mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Fix to be able to compile normal(ish) binaries with --enable-fuzz
--HG-- branch : fuzz
This commit is contained in:
@@ -20,14 +20,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
|
||||
m_malloc_set_epoch(1);
|
||||
|
||||
// choose a keytype based on input
|
||||
/* choose a keytype based on input */
|
||||
uint8_t b = 0;
|
||||
size_t i;
|
||||
for (i = 0; i < Size; i++) {
|
||||
b ^= Data[i];
|
||||
}
|
||||
const char* algoname = fuzz_signkey_names[b%DROPBEAR_SIGNKEY_NUM_NAMED];
|
||||
const char* keyblob = "blob"; // keep short
|
||||
const char* keyblob = "blob"; /* keep short */
|
||||
|
||||
if (setjmp(fuzz.jmp) == 0) {
|
||||
fuzz_checkpubkey_line(fuzz.input, 5, "/home/me/authorized_keys",
|
||||
@@ -37,7 +37,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
} else {
|
||||
m_malloc_free_epoch(1, 1);
|
||||
TRACE(("dropbear_exit longjmped"))
|
||||
// dropbear_exit jumped here
|
||||
/* dropbear_exit jumped here */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user