| Summary: | java.lang.ArrayIndexOutOfBoundsException during PDF rendition | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Donald Hayes <dbh03079> | ||||
| Component: | BIRT | Assignee: | Wei Yan <wyan> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Hao Zhou <hao.zhou> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bluesoldier, hustlg, zqian | ||||
| Version: | 2.6.0 | ||||||
| Target Milestone: | 4.4.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
fixed Verified in 3_7_2-20111216. This bug still exists in BIRT 4.2.0 for an HTML style containing "padding". It was only fixed for style containing "margin". The array dereference on lines 123-124 in ShortHandProcessor.java should be corrected as well (should be "vs[3]" instead of "vs[4]"). Created attachment 227961 [details]
array index fix when processing "padding"
The attached file fixes the erroneous array dereference when processing an HTML "padding" style element.
Mark as fixed. See commit 5eeefcf02e449199e5ae9b4309c03714ced6eeea. |
Build Identifier: A java.lang.ArrayIndexOutOfBoundsException is generated when a dynamic text box has HTML content and an element has a style containing padding or margin with 4 entries. For example: an HTML style containing "margin: 0in -5.4pt 0pt 0in" will cause an exception. The bug is in ShortHandProcessor.java (plugins/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/util). In the static ShortHandProcessor for both margin and padding, there is a switch statement on the length of an array ("vs"). Case 4 tries to dereference the array as "vs[4]" which is guaranteed to be out of bounds. It should be "vs[3]" in both places. Reproducible: Always