diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -509,6 +509,10 @@ def chunk_sRGB(self, pos, length):
         # 3 absolute colorimetric
 
         s = ImageFile._safe_read(self.fp, length)
+        if length < 1:
+            if ImageFile.LOAD_TRUNCATED_IMAGES:
+                return s
+            raise ValueError("Truncated sRGB chunk")
         self.im_info["srgb"] = s[0]
         return s
 

diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py
--- a/Tests/test_file_png.py
+++ b/Tests/test_file_png.py
@@ -635,7 +635,9 @@ def test_padded_idat(self):
 
             assert_image_equal_tofile(im, "Tests/images/bw_gradient.png")
 
-    @pytest.mark.parametrize("cid", (b"IHDR", b"pHYs", b"acTL", b"fcTL", b"fdAT"))
+    @pytest.mark.parametrize(
+        "cid", (b"IHDR", b"sRGB", b"pHYs", b"acTL", b"fcTL", b"fdAT")
+    )
     def test_truncated_chunks(self, cid):
         fp = BytesIO()
         with PngImagePlugin.PngStream(fp) as png:

[PNG] IndexError is raised when the sRGB chunk is broken

### What did you do?

```python3

from PIL import Image
import io

# assumes the current directory is the root of this repository.
with open('Tests/images/imagedraw_polygon_1px_high.png', 'rb') as f:
    data = bytearray(f.read())

# insert the sRGB chunk after the IDAT chunk. Its length, chunk type and crc are valid, but the sRGB chunk should contain more data.
data[61:61] = b"\x00\x00\x00\x00sRGB\x10\x1c\xd3\xce"

# IndexError is raised
with Image.open(io.BytesIO(data)) as img:
    img.load()

```

### What did you expect to happen?

IndexError is a little conusing. Maybe ValueError is better.

### What actually happened?

```
Traceback (most recent call last):
  File "issue_index_error_simplified.py", line 14, in <module>
    img.load()
  File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFile.py", line 268, in load
    self.load_end()
  File "/usr/local/lib/python3.8/dist-packages/PIL/PngImagePlugin.py", line 978, in load_end
    self.png.call(cid, pos, length)
  File "/usr/local/lib/python3.8/dist-packages/PIL/PngImagePlugin.py", line 202, in call
    return getattr(self, "chunk_" + cid.decode("ascii"))(pos, length)
  File "/usr/local/lib/python3.8/dist-packages/PIL/PngImagePlugin.py", line 512, in chunk_sRGB
    self.im_info["srgb"] = s[0]
IndexError: index out of range
```

### What are your OS, Python and Pillow versions?

* OS: ubuntu:focal-20220426
* Python: 3.8.10
* Pillow: 9.2.0

