diff --git a/vendor/golang.org/x/image/font/sfnt/sfnt.go b/vendor/golang.org/x/image/font/sfnt/sfnt.go index d1ef8a6a084..8ed19e21a9f 100644 --- a/vendor/golang.org/x/image/font/sfnt/sfnt.go +++ b/vendor/golang.org/x/image/font/sfnt/sfnt.go @@ -214,9 +214,8 @@ func u32(b []byte) uint32 { // copying from the source to a caller-supplied buffer, and instead provide // direct access to the underlying []byte data. type source struct { - b []byte - r io.ReaderAt - minSize int // r is known to contain at least minSize bytes + b []byte + r io.ReaderAt // TODO: add a caching layer, if we're using the io.ReaderAt? Note that // this might make a source no longer safe to use concurrently. @@ -256,17 +255,6 @@ func (s *source) view(buf []byte, offset, length int) ([]byte, error) { return s.b[offset : offset+length], nil } - if end := offset + length; end > s.minSize && length > 1<<20 { - // We're reading more than 1MiB, and we don't know whether - // the file contains this data. Check that the data exists - // before we try to allocate. - var oneByte [1]byte - if n, err := s.r.ReadAt(oneByte[:], int64(end)-1); err != nil || n != 1 { - return nil, errInvalidBounds - } - s.minSize = end - } - // Read from the io.ReaderAt. if length <= cap(buf) { buf = buf[:length] diff --git a/vendor/golang.org/x/image/webp/decode.go b/vendor/golang.org/x/image/webp/decode.go index 15dc0ee5561..2371808f421 100644 --- a/vendor/golang.org/x/image/webp/decode.go +++ b/vendor/golang.org/x/image/webp/decode.go @@ -134,12 +134,6 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) { wantAlpha = (buf[0] & alphaBit) != 0 widthMinusOne = uint32(buf[4]) | uint32(buf[5])<<8 | uint32(buf[6])<<16 heightMinusOne = uint32(buf[7]) | uint32(buf[8])<<8 | uint32(buf[9])<<16 - if uint64(widthMinusOne+1)*uint64(heightMinusOne+1) > 1<<32-1 { - // The product of _Canvas Width_ and _Canvas Height_ MUST be - // at most 2^32 - 1. - // https://www.rfc-editor.org/rfc/rfc9649.html#section-2.7-12 - return nil, image.Config{}, errInvalidFormat - } if configOnly { if wantAlpha { return nil, image.Config{ diff --git a/vendor/modules.txt b/vendor/modules.txt index c103ca6b257..1767914b261 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2281,7 +2281,7 @@ golang.org/x/exp/slices golang.org/x/exp/slog golang.org/x/exp/slog/internal golang.org/x/exp/slog/internal/buffer -# golang.org/x/image v0.39.0 +# golang.org/x/image v0.38.0 ## explicit; go 1.25.0 golang.org/x/image/bmp golang.org/x/image/ccitt