### ImageMagick version

7.1.1.12-1.el9

### Operating system

Linux

### Operating system, version and so on

AlmaLinux 9.2

### Description

Hi!

There seems be a regression in the latest version. With 7.1.1.11 I am able to convert the attached image without any issues, warnings, whatsover. With 7.1.1.12 I get errors from ImageMagick while converting this JPEG image about premature end and the convert seems to fail. Although it does produce some images.

Thanks in advance. :-)

### Steps to Reproduce

```
$ convert -verbose bestand_2720_anton_64a9b50996023.jpg bestand_2720_anton_64a9b50996023.png
bestand_2720_anton_64a9b50996023.jpg[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 5.53477MiB 0.280u 0:00.295
bestand_2720_anton_64a9b50996023.jpg[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 4.95703MiB 0.150u 0:00.155
writing raw profile: type=mpf, length=82
writing raw profile: type=xmp, length=3965
bestand_2720_anton_64a9b50996023.jpg=>bestand_2720_anton_64a9b50996023.png[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 5.53477MiB 7.770u 0:07.247
writing raw profile: type=mpf, length=82
writing raw profile: type=xmp, length=3965
bestand_2720_anton_64a9b50996023.jpg=>bestand_2720_anton_64a9b50996023.png[1] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 4.95703MiB 14.630u 0:13.590
convert: Premature end of JPEG file `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ warning/jpeg.c/JPEGWarningHandler/403.
convert: insufficient image data in file `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ error/jpeg.c/ReadProfileData/478.
convert: Improper call to JPEG library in state 201 `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ error/jpeg.c/JPEGErrorHandler/348.
```

### Images

![bestand_2720_anton_64a9b50996023](https://github.com/ImageMagick/ImageMagick/assets/2273262/6d4d0a89-510d-4fa0-8b73-d96ea8144908)

Cannot convert JPEG file: improper call to JPEG library in state 201
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Cannot convert JPEG file: improper call to JPEG library in state 201
Issue date:

--- start body ---
### ImageMagick version

7.1.1.12-1.el9

### Operating system

Linux

### Operating system, version and so on

AlmaLinux 9.2

### Description

Hi!

There seems be a regression in the latest version. With 7.1.1.11 I am able to convert the attached image without any issues, warnings, whatsover. With 7.1.1.12 I get errors from ImageMagick while converting this JPEG image about premature end and the convert seems to fail. Although it does produce some images.

Thanks in advance. :-)

### Steps to Reproduce

```
$ convert -verbose bestand_2720_anton_64a9b50996023.jpg bestand_2720_anton_64a9b50996023.png
bestand_2720_anton_64a9b50996023.jpg[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 5.53477MiB 0.280u 0:00.295
bestand_2720_anton_64a9b50996023.jpg[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 4.95703MiB 0.150u 0:00.155
writing raw profile: type=mpf, length=82
writing raw profile: type=xmp, length=3965
bestand_2720_anton_64a9b50996023.jpg=>bestand_2720_anton_64a9b50996023.png[0] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 5.53477MiB 7.770u 0:07.247
writing raw profile: type=mpf, length=82
writing raw profile: type=xmp, length=3965
bestand_2720_anton_64a9b50996023.jpg=>bestand_2720_anton_64a9b50996023.png[1] JPEG 4608x3456 4608x3456+0+0 8-bit sRGB 4.95703MiB 14.630u 0:13.590
convert: Premature end of JPEG file `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ warning/jpeg.c/JPEGWarningHandler/403.
convert: insufficient image data in file `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ error/jpeg.c/ReadProfileData/478.
convert: Improper call to JPEG library in state 201 `/tmp/magick-fYqNZLmEg0tGfuorQxH9WmUioCepE1iw' @ error/jpeg.c/JPEGErrorHandler/348.
```

### Images

![bestand_2720_anton_64a9b50996023](https://github.com/ImageMagick/ImageMagick/assets/2273262/6d4d0a89-510d-4fa0-8b73-d96ea8144908)

--- end body ---
