From 4c86d2a289ec00c526ce47f61a95f2e6068d41bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:46:25 +0000 Subject: [PATCH] build(deps): bump golang.org/x/image from 0.36.0 to 0.38.0 Bumps [golang.org/x/image](https://github.com/golang/image) from 0.36.0 to 0.38.0. - [Commits](https://github.com/golang/image/compare/v0.36.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/image dependency-version: 0.38.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +-- vendor/golang.org/x/image/tiff/buffer.go | 33 ++++++++++++------------ vendor/golang.org/x/image/webp/decode.go | 2 +- vendor/modules.txt | 4 +-- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index b19a2538ab..c0957cd89b 100644 --- a/go.mod +++ b/go.mod @@ -105,7 +105,7 @@ require ( go.opentelemetry.io/otel/trace v1.42.0 golang.org/x/crypto v0.49.0 golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac - golang.org/x/image v0.36.0 + golang.org/x/image v0.38.0 golang.org/x/net v0.52.0 golang.org/x/oauth2 v0.36.0 golang.org/x/sync v0.20.0 diff --git a/go.sum b/go.sum index 0390eb7ecf..54d0e2fca6 100644 --- a/go.sum +++ b/go.sum @@ -1383,8 +1383,8 @@ golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.36.0 h1:Iknbfm1afbgtwPTmHnS2gTM/6PPZfH+z2EFuOkSbqwc= -golang.org/x/image v0.36.0/go.mod h1:YsWD2TyyGKiIX1kZlu9QfKIsQ4nAAK9bdgdrIsE7xy4= +golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE= +golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/vendor/golang.org/x/image/tiff/buffer.go b/vendor/golang.org/x/image/tiff/buffer.go index d1801be48e..aaf1b06bf1 100644 --- a/vendor/golang.org/x/image/tiff/buffer.go +++ b/vendor/golang.org/x/image/tiff/buffer.go @@ -4,7 +4,10 @@ package tiff -import "io" +import ( + "io" + "slices" +) // buffer buffers an io.Reader to satisfy io.ReaderAt. type buffer struct { @@ -12,24 +15,19 @@ type buffer struct { buf []byte } +const fillChunkSize = 10 << 20 // 10 MB + // fill reads data from b.r until the buffer contains at least end bytes. func (b *buffer) fill(end int) error { m := len(b.buf) - if end > m { - if end > cap(b.buf) { - newcap := 1024 - for newcap < end { - newcap *= 2 - } - newbuf := make([]byte, end, newcap) - copy(newbuf, b.buf) - b.buf = newbuf - } else { - b.buf = b.buf[:end] - } - if n, err := io.ReadFull(b.r, b.buf[m:end]); err != nil { - end = m + n - b.buf = b.buf[:end] + for m < end { + next := min(end-m, fillChunkSize) + b.buf = slices.Grow(b.buf, next) + b.buf = b.buf[:m+next] + n, err := io.ReadFull(b.r, b.buf[m:m+next]) + m += n + b.buf = b.buf[:m] + if err != nil { return err } } @@ -44,7 +42,8 @@ func (b *buffer) ReadAt(p []byte, off int64) (int, error) { } err := b.fill(end) - return copy(p, b.buf[o:end]), err + end = min(end, len(b.buf)) + return copy(p, b.buf[min(o, end):end]), err } // Slice returns a slice of the underlying buffer. The slice contains diff --git a/vendor/golang.org/x/image/webp/decode.go b/vendor/golang.org/x/image/webp/decode.go index 0df3c67e88..2371808f42 100644 --- a/vendor/golang.org/x/image/webp/decode.go +++ b/vendor/golang.org/x/image/webp/decode.go @@ -103,7 +103,7 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) { return m, image.Config{}, nil case fccVP8L: - if wantAlpha || alpha != nil { + if alpha != nil { return nil, image.Config{}, errInvalidFormat } if configOnly { diff --git a/vendor/modules.txt b/vendor/modules.txt index 3daf776b17..ef947c5a05 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2447,8 +2447,8 @@ 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.36.0 -## explicit; go 1.24.0 +# golang.org/x/image v0.38.0 +## explicit; go 1.25.0 golang.org/x/image/bmp golang.org/x/image/ccitt golang.org/x/image/font