comparison fuzz-common.c @ 1457:32f990cc96b1 fuzz

fix bad assertion
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 Jan 2018 23:27:40 +0800
parents a90fdd2d2ed8
children 66a1a2547133
comparison
equal deleted inserted replaced
1456:a90fdd2d2ed8 1457:32f990cc96b1
5 #include "dbutil.h" 5 #include "dbutil.h"
6 #include "runopts.h" 6 #include "runopts.h"
7 #include "crypto_desc.h" 7 #include "crypto_desc.h"
8 #include "session.h" 8 #include "session.h"
9 #include "dbrandom.h" 9 #include "dbrandom.h"
10 #include "bignum.h"
10 #include "fuzz-wrapfd.h" 11 #include "fuzz-wrapfd.h"
11 12
12 struct dropbear_fuzz_options fuzz; 13 struct dropbear_fuzz_options fuzz;
13 14
14 static void fuzz_dropbear_log(int UNUSED(priority), const char* format, va_list param); 15 static void fuzz_dropbear_log(int UNUSED(priority), const char* format, va_list param);
135 void fuzz_fake_send_kexdh_reply(void) { 136 void fuzz_fake_send_kexdh_reply(void) {
136 assert(!ses.dh_K); 137 assert(!ses.dh_K);
137 m_mp_alloc_init_multi(&ses.dh_K, NULL); 138 m_mp_alloc_init_multi(&ses.dh_K, NULL);
138 mp_set_int(ses.dh_K, 12345678); 139 mp_set_int(ses.dh_K, 12345678);
139 finish_kexhashbuf(); 140 finish_kexhashbuf();
140 assert(!ses.dh_K);
141 } 141 }
142 142
143 int fuzz_run_preauth(const uint8_t *Data, size_t Size, int skip_kexmaths) { 143 int fuzz_run_preauth(const uint8_t *Data, size_t Size, int skip_kexmaths) {
144 static int once = 0; 144 static int once = 0;
145 if (!once) { 145 if (!once) {