From f0882dc752138f96b6e6c570d9b9217384b66f88 Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 26 Feb 2024 18:29:08 +0000 Subject: [PATCH] Make sure timingRatio() is calculating based on correct data --- osscan2.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osscan2.cc b/osscan2.cc index c9cae0338..96f9aaaa7 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -802,12 +802,14 @@ static void endRound(OsScanInfo *OSI, HostOsScan *HOS, int roundNum) { for (hostI = OSI->incompleteHosts.begin(); hostI != OSI->incompleteHosts.end(); hostI++) { distance = -1; hsi = *hostI; + /* Have to calculate timingRatio before calling makeFP, since that can muck + * with the seq_send_times array. */ + double tr = hsi->hss->timingRatio(); HOS->makeFP(hsi->hss); hsi->FPs[roundNum] = hsi->hss->getFP(); hsi->FPR->FPs[roundNum] = hsi->FPs[roundNum]; hsi->FPR->numFPs = roundNum + 1; - double tr = hsi->hss->timingRatio(); hsi->target->FPR->maxTimingRatio = MAX(hsi->target->FPR->maxTimingRatio, tr); match_fingerprint(hsi->FPs[roundNum], &hsi->FP_matches[roundNum], o.reference_FPs, OSSCAN_GUESS_THRESHOLD);