@Test
    void testNegativePaletteLength() {
        final File inputFile = TestResources.resourceToFile("/images/bmp/IMAGING-325/crash-3afb569de74522535ef65922233e1920455cdc14.bmp");
        assertThrows(ImagingException.class, () -> new BmpImageParser().dumpImageFile(ByteSource.file(inputFile)));
    }
Test that when the value of the mask parameter is zero, getMaskShift won't get stuck in one of its while loops.

@throws IOException
@throws ImagingException
src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java