avoid leak of pubkey_options

This commit is contained in:
Matt Johnston
2018-03-06 22:18:20 +08:00
parent 4fd3160179
commit e9edbe8bb2
3 changed files with 11 additions and 2 deletions

View File

@@ -30,10 +30,16 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (have_algo(algoname, algolen, sshhostkey) == DROPBEAR_FAILURE) {
dropbear_exit("fuzzer imagined a bogus algorithm");
}
fuzz_checkpubkey_line(line, 5, "/home/me/authorized_keys",
int ret = fuzz_checkpubkey_line(line, 5, "/home/me/authorized_keys",
algoname, algolen,
keyblob->data, keyblob->len);
if (ret == DROPBEAR_SUCCESS) {
/* fuzz_checkpubkey_line() should have cleaned up for failure */
svr_pubkey_options_cleanup();
}
buf_free(line);
buf_free(keyblob);
m_free(algoname);