diff options
| author | 2023-10-09 10:13:37 +0200 | |
|---|---|---|
| committer | 2023-10-09 10:13:37 +0200 | |
| commit | abd598e8f63f640497242c62e004b4a75601482e (patch) | |
| tree | ce51addf774dbce0ed3d6187d6436f88190ad10d /vendor/github.com/abema/go-mp4/box_info.go | |
| parent | [chore]: Bump golang.org/x/net from 0.15.0 to 0.16.0 (#2260) (diff) | |
| download | gotosocial-abd598e8f63f640497242c62e004b4a75601482e.tar.xz | |
[chore]: Bump github.com/abema/go-mp4 from 1.0.0 to 1.1.1 (#2257)
Bumps [github.com/abema/go-mp4](https://github.com/abema/go-mp4) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/abema/go-mp4/releases)
- [Commits](https://github.com/abema/go-mp4/compare/v1.0.0...v1.1.1)
---
updated-dependencies:
- dependency-name: github.com/abema/go-mp4
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/abema/go-mp4/box_info.go')
| -rw-r--r-- | vendor/github.com/abema/go-mp4/box_info.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/abema/go-mp4/box_info.go b/vendor/github.com/abema/go-mp4/box_info.go index b5c587fd9..402b418ef 100644 --- a/vendor/github.com/abema/go-mp4/box_info.go +++ b/vendor/github.com/abema/go-mp4/box_info.go @@ -3,6 +3,7 @@ package mp4 import ( "bytes" "encoding/binary" + "fmt" "io" "math" ) @@ -128,7 +129,6 @@ func ReadBoxInfo(r io.ReadSeeker) (*BoxInfo, error) { if _, err := bi.SeekToPayload(r); err != nil { return nil, err } - } else if bi.Size == 1 { // read more 8 bytes buf.Reset() @@ -139,6 +139,10 @@ func ReadBoxInfo(r io.ReadSeeker) (*BoxInfo, error) { bi.Size = binary.BigEndian.Uint64(buf.Bytes()) } + if bi.Size == 0 { + return nil, fmt.Errorf("invalid size") + } + return bi, nil } |
