Skip to content
Snippets Groups Projects
Commit 2269d033 authored by Guillem Jover's avatar Guillem Jover
Browse files

libdpkg: Handle missing Version when formatting source:Upstream-Version


When dealing with virtual packages (such as the ones from Provides, or
for not-installed Recommends or Suggests), there might be no version
field at all, so we cannot assume we can use these when filling in the
version information in the fallback code handling the missing Source
field.

The commit that removed the check for not-installed packages missed that
this instance had not been protected, as the code in varbufversion() is
doing the correct thing, but unfortunately we are not using that because
we need to get at the upstream part, so we need to also check explicitly
for a non-NULL upstream part. This was causing a segfault.

Fixes: commit 560574b5
Stable-Candidates: 1.20.x 1.21.x
Reported-by: default avatarJohn Scott <jscott@posteo.net>
(cherry picked from commit 2c4814f7)
parent 6910ce67
No related branches found
No related tags found
1 merge request!4Update crimson to version from bookworm
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment