From 235dab9f244d16e7eaf7e0858ce8a1614580de9c Mon Sep 17 00:00:00 2001 From: david Date: Thu, 23 Sep 2010 05:58:39 +0000 Subject: [PATCH] Fix an array allocation; we were allocating a multiple of the size of a struct, not the size of a pointer to it. Over-allocating did no harm beyond wasting some memory. --- osscan2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osscan2.cc b/osscan2.cc index b2700f2d0..0ab8be9e6 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -2750,7 +2750,7 @@ HostOsScanInfo::HostOsScanInfo(Target *t, OsScanInfo *OsSI) { target = t; OSI = OsSI; - FPs = (FingerPrint **) safe_zalloc(o.maxOSTries() * sizeof(FingerPrint)); + FPs = (FingerPrint **) safe_zalloc(o.maxOSTries() * sizeof(FingerPrint *)); FP_matches = (FingerPrintResults *) safe_zalloc(o.maxOSTries() * sizeof(FingerPrintResults)); timedOut = false; isCompleted = false;