summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-cli-show
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-12-16 13:15:28 +0100
committerJulian Andres Klode <jak@debian.org>2024-12-16 13:15:28 +0100
commit19000fab15ab0b30c95a1bf6e034aa3c6bdc36cb (patch)
tree5cbd401ba99532f1baf56daa06c4e8cc15d83c13 /test/integration/test-apt-cli-show
parent93325e6c0eedfa16246f7ec0498ed6b3e4c6f553 (diff)
Fix out-of-bounds read in `apt show :`
We tried to access str.size() - 1 on a 0-sized string, which does not work, and now that we build with assertions triggers it. Closes: #1090068
Diffstat (limited to 'test/integration/test-apt-cli-show')
-rwxr-xr-xtest/integration/test-apt-cli-show4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show
index 05a801f6a..010775d9b 100755
--- a/test/integration/test-apt-cli-show
+++ b/test/integration/test-apt-cli-show
@@ -28,6 +28,10 @@ setupaptarchive
APTARCHIVE=$(readlink -f ./aptarchive)
+testfailureequal "N: Unable to locate package :
+N: Unable to locate package :
+E: No packages found" apt show :
+
# note that we do not display Description-md5 with the "apt" cmd
# and also show some additional fields that are calculated
testsuccessequal "Package: foo