Skip to content

Commit

Permalink
fix: potential size overflow in stss
Browse files Browse the repository at this point in the history
  • Loading branch information
eric committed Jan 15, 2025
1 parent 484b6cf commit 7ea87a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mp4/stss.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (b *StssBox) Size() uint64 {

// expectedSize - calculate size for a given entry count
func (b *StssBox) expectedSize(entryCount uint32) uint64 {
return uint64(boxHeaderSize + 8 + int(entryCount)*4)
return uint64(boxHeaderSize + 8 + uint64(entryCount)*4)
}

// IsSyncSample - check if sample (one-based) sampleNr is a sync sample
Expand Down

0 comments on commit 7ea87a3

Please sign in to comment.