summaryrefslogtreecommitdiff
path: root/test/pinning13.test
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-06-29 15:39:56 +0200
committerWilliam Pitcock <nenolod@dereferenced.org>2018-07-02 08:52:22 -0500
commit5c4b90dfd48d476b9e7aae2ad6627dd6f03ac557 (patch)
tree68cf8d0d548db43a0135ade656594b5f852cacab /test/pinning13.test
parent6685909777675c1676ade06bbe84c72a914dc98b (diff)
downloadapk-tools-5c4b90dfd48d476b9e7aae2ad6627dd6f03ac557.tar.gz
apk-tools-5c4b90dfd48d476b9e7aae2ad6627dd6f03ac557.tar.bz2
apk-tools-5c4b90dfd48d476b9e7aae2ad6627dd6f03ac557.tar.xz
apk-tools-5c4b90dfd48d476b9e7aae2ad6627dd6f03ac557.zip
list: fix segmentation fault with virtual packages
Virtual packages have the origin pointer set to NULL. Trying to print it using the BLOB_PRINTF macros causes a segmentation fault. Inspired by the `print_origin_name` function from `src/search.c` this commit attempts to fix it by checking whether `pkg->origin` is NULL before attempting to print it. If it is NULL the pkg name is printed instead. Since printing the pkg name requires a different format string this commit splits the printf call for printing the package line into multiple ones. The output format shouldn't have changed at all though.
Diffstat (limited to 'test/pinning13.test')
0 files changed, 0 insertions, 0 deletions