comparison fuzz/fuzz-sshpacketmutator.c @ 1775:8179eabe16c9

fuzzing - fix some wrong types and -lcrypt on macos
author Matt Johnston <matt@ucc.asn.au>
date Mon, 02 Nov 2020 20:33:48 +0800
parents 833bf9947603
children
comparison
equal deleted inserted replaced
1774:833bf9947603 1775:8179eabe16c9
283 unsigned int min_out = MIN(num_packets1, num_packets2); 283 unsigned int min_out = MIN(num_packets1, num_packets2);
284 unsigned int max_out = num_packets1 + num_packets2; 284 unsigned int max_out = num_packets1 + num_packets2;
285 unsigned int num_out = min_out + nrand48(randstate) % (max_out-min_out+1); 285 unsigned int num_out = min_out + nrand48(randstate) % (max_out-min_out+1);
286 286
287 for (i = 0; i < num_out; i++) { 287 for (i = 0; i < num_out; i++) {
288 int choose = nrand48(randstate) % (num_packets1 + num_packets2); 288 unsigned int choose = nrand48(randstate) % (num_packets1 + num_packets2);
289 buffer *p = NULL; 289 buffer *p = NULL;
290 if (choose < num_packets1) { 290 if (choose < num_packets1) {
291 p = packets1[choose]; 291 p = packets1[choose];
292 } else { 292 } else {
293 p = packets2[choose-num_packets1]; 293 p = packets2[choose-num_packets1];