### ImageMagick version

7.1.1.15-1.fc38

### Operating system

Linux

### Operating system, version and so on

Fedora 38

### Description

Segmentation when reading pixels from a paletted image:
```c++
// --> img is PseudoClass and PaletteType
        const auto nrOfColors = img.colorMapSize(); <-- 256
        const auto nrOfIndices = img.columns() * img.rows(); <-- correct # of pixels
        auto pixels = img.getConstPixels(0, 0, img.columns(), img.rows()); // returns valid pointer. needed for getConstMetaContent to work...
        auto indices = static_cast<const uint8_t *>(img.getConstMetacontent()); <-- crash
```

Doing anything wrong?

### Steps to Reproduce

see above

### Images

![new_height](https://github.com/ImageMagick/ImageMagick/assets/1310747/bafd5fe3-70fd-4179-81fc-11a662f8364b)

Magick++: Segmentation fault on getConstMetacontent when reading a paletted image
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Magick++: Segmentation fault on getConstMetacontent when reading a paletted image
Issue date:

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

7.1.1.15-1.fc38

### Operating system

Linux

### Operating system, version and so on

Fedora 38

### Description

Segmentation when reading pixels from a paletted image:
```c++
// --> img is PseudoClass and PaletteType
        const auto nrOfColors = img.colorMapSize(); <-- 256
        const auto nrOfIndices = img.columns() * img.rows(); <-- correct # of pixels
        auto pixels = img.getConstPixels(0, 0, img.columns(), img.rows()); // returns valid pointer. needed for getConstMetaContent to work...
        auto indices = static_cast<const uint8_t *>(img.getConstMetacontent()); <-- crash
```

Doing anything wrong?

### Steps to Reproduce

see above

### Images

![new_height](https://github.com/ImageMagick/ImageMagick/assets/1310747/bafd5fe3-70fd-4179-81fc-11a662f8364b)

--- end body ---
