Changeset 15408 in josm for trunk/src


Ignore:
Timestamp:
2019-10-03T20:13:11+02:00 (5 years ago)
Author:
Don-vip
Message:

see #18199 - log an error and return empty image for too large dimensions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r15049 r15408  
    16571657        int roundedWidth = Math.round(realWidth);
    16581658        int roundedHeight = Math.round(realHeight);
    1659         if (roundedWidth <= 0 || roundedHeight <= 0) {
     1659        if (roundedWidth <= 0 || roundedHeight <= 0 || roundedWidth >= Integer.MAX_VALUE || roundedHeight >= Integer.MAX_VALUE) {
    16601660            Logging.error("createImageFromSvg: {0} {1} realWidth={2} realHeight={3}",
    16611661                    svg.getXMLBase(), dim, Float.toString(realWidth), Float.toString(realHeight));
Note: See TracChangeset for help on using the changeset viewer.