Mercurial > dropbear
comparison fuzzer-pubkey.c @ 1598:252b406d0e9a
avoid leak of pubkey_options
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Mar 2018 22:18:20 +0800 |
parents | e6a5e51a29c9 |
children | ba6fc7afe1c5 |
comparison
equal
deleted
inserted
replaced
1597:8f7b6f75aa58 | 1598:252b406d0e9a |
---|---|
28 char* algoname = buf_getstring(keyblob, &algolen); | 28 char* algoname = buf_getstring(keyblob, &algolen); |
29 | 29 |
30 if (have_algo(algoname, algolen, sshhostkey) == DROPBEAR_FAILURE) { | 30 if (have_algo(algoname, algolen, sshhostkey) == DROPBEAR_FAILURE) { |
31 dropbear_exit("fuzzer imagined a bogus algorithm"); | 31 dropbear_exit("fuzzer imagined a bogus algorithm"); |
32 } | 32 } |
33 fuzz_checkpubkey_line(line, 5, "/home/me/authorized_keys", | 33 |
34 int ret = fuzz_checkpubkey_line(line, 5, "/home/me/authorized_keys", | |
34 algoname, algolen, | 35 algoname, algolen, |
35 keyblob->data, keyblob->len); | 36 keyblob->data, keyblob->len); |
37 | |
38 if (ret == DROPBEAR_SUCCESS) { | |
39 /* fuzz_checkpubkey_line() should have cleaned up for failure */ | |
40 svr_pubkey_options_cleanup(); | |
41 } | |
36 | 42 |
37 buf_free(line); | 43 buf_free(line); |
38 buf_free(keyblob); | 44 buf_free(keyblob); |
39 m_free(algoname); | 45 m_free(algoname); |
40 m_malloc_free_epoch(1, 0); | 46 m_malloc_free_epoch(1, 0); |