summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-10-06 21:15:50 +0000
committerJulian Andres Klode <jak@debian.org>2025-10-06 21:15:50 +0000
commit8066395be320ea253d9d973bb55abeb5b4e1e3b2 (patch)
tree99b2772ca705f904d0b8dd860e3083231fc1dca9 /apt-private
parent0d083dd1eed93bfbca712f00c02de61b53acaf96 (diff)
parentbcc245651becca2ce226589e76a7c7f0177e40a5 (diff)
Merge branch 'history-command-id-error-fix' into 'main'
Fix history command error when no ID was given See merge request apt-team/apt!520
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-history.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-private/private-history.cc b/apt-private/private-history.cc
index cf4540772..31b3b1333 100644
--- a/apt-private/private-history.cc
+++ b/apt-private/private-history.cc
@@ -352,6 +352,8 @@ class TransactionController
static bool ParseId(const char *str, size_t &id, size_t max)
{
+ if (str == nullptr)
+ return _error->Error(_("Incorrect usage, no ID was given."));
try
{
id = std::stoi(str);