Skip to content

Commit

Permalink
Merge pull request #1133 from jiangliu/v2.2-fix-get-compressed-size
Browse files Browse the repository at this point in the history
nydus-image: fix a underflow issue in get_compressed_size()
  • Loading branch information
jiangliu authored Mar 3, 2023
2 parents a38f6b8 + 6e0f69b commit 1155252
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin/nydus-image/core/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ impl Blob {
blob_mgr: &mut BlobManager,
blob_writer: &mut ArtifactWriter,
) -> Result<()> {
if ctx.blob_inline_meta || ctx.features.is_enabled(Feature::BlobToc) {
if !ctx.blob_features.contains(BlobFeatures::SEPARATE)
&& (ctx.blob_inline_meta || ctx.features.is_enabled(Feature::BlobToc))
{
if let Some((_, blob_ctx)) = blob_mgr.get_current_blob() {
blob_ctx.write_tar_header(
blob_writer,
Expand Down

0 comments on commit 1155252

Please sign in to comment.