Skip to content

Commit

Permalink
Merge pull request containerd#8631 from thaJeztah/1.7_backport_fix_di…
Browse files Browse the repository at this point in the history
…ff_proxy

[1.7 backport] Fix panic when remote differ returns empty result
  • Loading branch information
kzys authored Jun 2, 2023
2 parents 02a00c3 + e134b63 commit 0aa82d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func (r *diffRemote) Compare(ctx context.Context, a, b []mount.Mount, opts ...di
}

func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
if d == nil {
return ocispec.Descriptor{}
}
return ocispec.Descriptor{
MediaType: d.MediaType,
Digest: digest.Digest(d.Digest),
Expand Down

0 comments on commit 0aa82d1

Please sign in to comment.