summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-26 12:42:58 +0200
committerJulian Andres Klode <jak@debian.org>2025-05-26 12:43:24 +0200
commit6c3196950acb6a1351c221c74edd9c3ba691b7e5 (patch)
tree976a714c2f5b05a6868188e221745f60f23f8288 /apt-pkg/solver3.h
parent9d0f306b3e1b4a485b6fb31e90ae849d2a46c636 (diff)
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.
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h2
1 files changed, 1 insertions, 1 deletions
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<depth_type> choices{};
// \brief The time we called Solve()
- time_t startTime;
+ time_t startTime{};
EDSP::Request::Flags requestFlags;
/// Various configuration options