Skip to content

Commit c1fcc37

Browse files
committed
fix: correct the range check for descriptor IDs
1 parent fd8a090 commit c1fcc37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sif/create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (f *FileImage) writeDataObject(i int, di DescriptorInput, t time.Time) erro
9797
}
9898

9999
// We derive the ID from i, so make sure the ID will not overflow.
100-
if i >= math.MaxInt32 {
100+
if int64(i) >= math.MaxUint32 {
101101
return errObjectIDOverflow
102102
}
103103

0 commit comments

Comments
 (0)