In the interface using PDFBox, the code is as follows:
Pdfimagewriter ImageWriter = new Pdfimagewriter ();
Imagewriter.writeimage (Pddoc, ImageType, NULL, StartPage, EndPage, Imagefilepath, 1, constants.num_two_hundred), The image was found to be generated, but the memory overflow error was reported. After looking at the source code search related data found that there is such a problem, so the replacement of the JDK is OK.
The Jpegimagewriter.writeimage function of the Java Runtime Environment does not correctly handle JPEG graphics dimensions. If the dimension of the child example specifies a large value, an integer overflow may be triggered, causing arbitrary code to execute with the privileges of the currently logged on user.
Affected systems: Sun JDK 1.6.x Sun jdk 1.5.x Sun JRE 1.6.x Sun JRE 1.5.x Sun JRE 1.4.x Sun SDK 1.4.x unaffected system: Sun jdk 1.6.0_22 Sun JD K 1.5.0_26 Sun JRE 1.6.0_22 Sun JRE 1.5.0_26 Sun JRE 1.4.2_28 Sun SDK 1.4.2_28 Description: bugtraqid:43985 C
Affected Systems:
Sun JDK 1.6.x
Sun JDK 1.5.x
Sun JRE 1.6.x
Sun JRE 1.5.x
Sun JRE 1.4.x
Sun SDK 1.4.x
Non-affected system:
Sun JDK 1.6.0_22
Sun JDK 1.5.0_26
Sun JRE 1.6.0_22
Sun JRE 1.5.0_26
Sun JRE 1.4.2_28
Sun SDK 1.4.2_28
This article is from the "FLYFISH90" blog, make sure to keep this source http://flyfish90.blog.51cto.com/2578651/1639735
Java Runtime Environment jpegimagewriter.writeimage function Integer Overflow Vulnerability _