From 381e9e7be22c76de5c28d61053b95ff1ab2923d6 Mon Sep 17 00:00:00 2001 From: Fabian Schiebel Date: Sun, 5 Jan 2025 14:05:19 +0100 Subject: [PATCH] Fix buffer overflow --- .../DataFlow/IfdsIde/Problems/IDEFeatureTaintAnalysis.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEFeatureTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEFeatureTaintAnalysis.h index c8edb4f3b..9cca9dc15 100644 --- a/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEFeatureTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEFeatureTaintAnalysis.h @@ -66,7 +66,8 @@ struct IDEFeatureTaintEdgeFact { if (RequiredSize > Taints.size()) { Taints.resize(RequiredSize); } - Taints.setBitsInMask((const uint32_t *)&Facts, sizeof(Facts)); + Taints.setBitsInMask((const uint32_t *)&Facts, + sizeof(Facts) / sizeof(uint32_t)); } void unionWith(const IDEFeatureTaintEdgeFact &Facts) { if (Facts.isTop()) {