mirror of
https://github.com/containers/podman.git
synced 2025-11-29 17:48:05 +08:00
Add newer c/i to support artifacts
Adding in a newer containers/image to make artifact a little easier to merge. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
12
vendor/github.com/sylabs/sif/v2/pkg/sif/create.go
generated
vendored
12
vendor/github.com/sylabs/sif/v2/pkg/sif/create.go
generated
vendored
@@ -23,21 +23,19 @@ var errAlignmentOverflow = errors.New("integer overflow when calculating alignme
|
||||
|
||||
// nextAligned finds the next offset that satisfies alignment.
|
||||
func nextAligned(offset int64, alignment int) (int64, error) {
|
||||
align64 := uint64(alignment)
|
||||
offset64 := uint64(offset)
|
||||
align64 := int64(alignment)
|
||||
|
||||
if align64 <= 0 || offset64%align64 == 0 {
|
||||
if align64 <= 0 || offset%align64 == 0 {
|
||||
return offset, nil
|
||||
}
|
||||
|
||||
offset64 += (align64 - offset64%align64)
|
||||
align64 -= offset % align64
|
||||
|
||||
if offset64 > math.MaxInt64 {
|
||||
if (math.MaxInt64 - offset) < align64 {
|
||||
return 0, errAlignmentOverflow
|
||||
}
|
||||
|
||||
//nolint:gosec // Overflow handled above.
|
||||
return int64(offset64), nil
|
||||
return offset + align64, nil
|
||||
}
|
||||
|
||||
// writeDataObjectAt writes the data object described by di to ws, using time t, recording details
|
||||
|
||||
Reference in New Issue
Block a user