From 6c3196950acb6a1351c221c74edd9c3ba691b7e5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 26 May 2025 12:42:58 +0200 Subject: solver3: Initialize startTime if not set in Pop() If the user pushes Assumptions that fail, we could inadvertently timeout during the Pop() as the variable was not initialized. Always initialize it to 0, and if we haven't set an actual time by the time we Pop() set it there. --- apt-pkg/solver3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index eb589d2bd..590b187cc 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -222,7 +222,7 @@ class Solver std::vector choices{}; // \brief The time we called Solve() - time_t startTime; + time_t startTime{}; EDSP::Request::Flags requestFlags; /// Various configuration options -- cgit v1.2.3-70-g09d2