Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318951

Additional negative value check in JPEG decoding

XMLWordPrintable

    • 2d
    • b22
    • generic
    • generic

        We skip jpeg data during decoding using imageio_skip_input_data() in both src/java.desktop/share/native/libjavajpeg/imageioJPEG.c and src/java.desktop/share/native/libjavajpeg/jpegdecoder.c

        We update num_bytes with sb->remaining_skip in these functions and it can overflow. We need additional check for num_bytes here.

        We have similar function in native/libsplashscreen/splashscreen_jpeg.c : stream_skip_input_data(..) but here we use num_bytes only when it is positive value.

              jdv Jayathirth D V
              jdv Jayathirth D V
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: