### ImageMagick version

7.1.1-29

### Operating system

Linux

### Operating system, version and so on

Debian 12 (bookworm)

### Description

Something changed between versions 7.1.1-17 and 7.1.1-29 that causing the application to run out of memory. I could narrow down the problem to `posterise` flag.

### Steps to Reproduce

Running below command causing IM to crash:

```
convert ./test.png -auto-orient -posterize 136 -dither None -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=0 -define png:exclude-chunk=bKGD,cHRM,EXIF,gAMA,iCCP,iTXt,sRGB,tEXt,zCCP,zTXt,date -define heic:speed=6 -interlace None -colorspace sRGB -sampling-factor 4:2:0 +profile '!icc,*' -define webp:lossless=true -quality 100 -define jxl:effort=9 -define webp:method=6 webp:./test.webp
```

Removing `-posterize 136` make it work :)

### Images

![test](https://github.com/ImageMagick/ImageMagick/assets/124110/431b67b3-176e-433b-b313-1aeb6b20a980)

Posterize flag crashing the application
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Posterize flag crashing the application
Issue date:

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

7.1.1-29

### Operating system

Linux

### Operating system, version and so on

Debian 12 (bookworm)

### Description

Something changed between versions 7.1.1-17 and 7.1.1-29 that causing the application to run out of memory. I could narrow down the problem to `posterise` flag.

### Steps to Reproduce

Running below command causing IM to crash:

```
convert ./test.png -auto-orient -posterize 136 -dither None -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=0 -define png:exclude-chunk=bKGD,cHRM,EXIF,gAMA,iCCP,iTXt,sRGB,tEXt,zCCP,zTXt,date -define heic:speed=6 -interlace None -colorspace sRGB -sampling-factor 4:2:0 +profile '!icc,*' -define webp:lossless=true -quality 100 -define jxl:effort=9 -define webp:method=6 webp:./test.webp
```

Removing `-posterize 136` make it work :)

### Images

![test](https://github.com/ImageMagick/ImageMagick/assets/124110/431b67b3-176e-433b-b313-1aeb6b20a980)

--- end body ---
