@@ -83,6 +83,8 @@ static u32 tcnt, highest; /* tuple content information */
83
83
84
84
static u32 in_len ; /* Input data length */
85
85
86
+ static u32 score ;
87
+
86
88
static u32 map_size = MAP_SIZE , timed_out = 0 ;
87
89
88
90
static bool quiet_mode , /* Hide non-essential messages? */
@@ -238,6 +240,13 @@ static void at_exit_handler(void) {
238
240
static void analyze_results (afl_forkserver_t * fsrv ) {
239
241
240
242
u32 i ;
243
+
244
+ if (unlikely ((score = * (u32 * )((u8 * )fsrv -> trace_bits + 1 )) > 0 )) {
245
+
246
+ memset (fsrv -> trace_bits + 1 , 0 , 4 );
247
+
248
+ }
249
+
241
250
for (i = 0 ; i < map_size ; i ++ ) {
242
251
243
252
if (fsrv -> trace_bits [i ]) {
@@ -269,6 +278,12 @@ static u32 write_results_to_file(afl_forkserver_t *fsrv, u8 *outfile) {
269
278
270
279
}
271
280
281
+ if (unlikely ((score = * (u32 * )((u8 * )fsrv -> trace_bits + 1 )) > 0 )) {
282
+
283
+ memset (fsrv -> trace_bits + 1 , 0 , 4 );
284
+
285
+ }
286
+
272
287
if (cmin_mode &&
273
288
(fsrv -> last_run_timed_out || (!caa && child_crashed != cco ))) {
274
289
@@ -1766,12 +1781,20 @@ int main(int argc, char **argv_orig, char **envp) {
1766
1781
OKF ("Captured %u tuples (map size %u, highest value %u, total values %llu) "
1767
1782
"in '%s'." cRST ,
1768
1783
tcnt , fsrv -> real_map_size , highest , total , out_file );
1769
- if (collect_coverage )
1784
+ if (collect_coverage ) {
1785
+
1770
1786
OKF ("A coverage of %u edges were achieved out of %u existing (%.02f%%) "
1771
1787
"with %llu input files." ,
1772
1788
tcnt , map_size , ((float )tcnt * 100 ) / (float )map_size ,
1773
1789
fsrv -> total_execs );
1774
1790
1791
+ } else if (score > 0 ) {
1792
+
1793
+ OKF ("Path score is %u (cyclomatic and/or vulnerability scoring).\n" ,
1794
+ score );
1795
+
1796
+ }
1797
+
1775
1798
}
1776
1799
1777
1800
if (stdin_file ) {
0 commit comments