-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 17, 21, 24, 25, 26
-
b11
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8366484 | 25.0.2 | Dmitry Markov | P3 | Resolved | Fixed | master |
JDK-8366534 | 21.0.10-oracle | Dmitry Markov | P3 | Resolved | Fixed | master |
JDK-8367524 | 21.0.10 | Goetz Lindenmaier | P3 | Resolved | Fixed | master |
JDK-8366670 | 17.0.18-oracle | Dmitry Markov | P3 | Resolved | Fixed | master |
JDK-8367526 | 17.0.18 | Goetz Lindenmaier | P3 | Resolved | Fixed | master |
JDK-8366810 | 11.0.30-oracle | Dmitry Markov | P3 | Resolved | Fixed | master |
They are basically two #defines of width and height and a byte array with the bits.
They were commonly used in X11 applications at a time when color graphics cards were not the norm.
JDK's Toolkit Image API has always supported these, even thought it is not specified or even documented.
The current implementation allows an arbitrarily large XBM which is not a valid use case for any XBM.
Also it doesn't validate that the provided byte array is sufficient to populate the specified WxH.
It is tempting to just delete the XBM support, but there's a small risk that some app actually depends on it.
So instead we can just limit the size to something reasonable.
XBMs would usually be something like 16x16 or 32x32, so maybe 128x128 pixels ? That's 16384 bytes.
We could go larger if someone thinks it necessary.
At the same time we can improve the overall implementation of this decoder.
- backported by
-
JDK-8366484 Enforce limits on the size of an XBM image
-
- Resolved
-
-
JDK-8366534 Enforce limits on the size of an XBM image
-
- Resolved
-
-
JDK-8366670 Enforce limits on the size of an XBM image
-
- Resolved
-
-
JDK-8366810 Enforce limits on the size of an XBM image
-
- Resolved
-
-
JDK-8367524 Enforce limits on the size of an XBM image
-
- Resolved
-
-
JDK-8367526 Enforce limits on the size of an XBM image
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk17u-dev/3c68d86a
-
Commit(master) openjdk/jdk21u-dev/0ec47087
-
Commit(master) openjdk/jdk25u/e5762b14
-
Commit(master) openjdk/jdk/c71be802
-
Review(master) openjdk/jdk17u-dev/3901
-
Review(master) openjdk/jdk21u-dev/2182
-
Review(master) openjdk/jdk25u/144
-
Review(master) openjdk/jdk/26488