SIGN IN SIGN UP
immich-app / immich UNCLAIMED

High performance self-hosted photo and video management solution.

0 0 61 TypeScript

fix(mobile): cronet buffer overflow on compressed thumbnails (#28439)

CronetImageFetcher sized the response buffer from Content-Length, which is
the compressed wire size. Cronet auto-decompresses gzip/br responses and
writes decompressed bytes into the buffer, exceeding it and throwing
IllegalArgumentException: ByteBuffer is already full on the next read. Use
the growable path; Content-Length becomes an initial alloc hint only,
capped at 128 MB so an untrusted server can't overflow Int.MAX_VALUE or
OOM us upfront. Reuse Cronet's ByteBuffer between reads when no grow is
needed.
S
Santo Shakil committed
01d6a244d86be4ccb5835d2edce66de4e10684b5
Parent: 21d6755
Committed by GitHub <noreply@github.com> on 5/15/2026, 6:48:23 PM