xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53502] New: [PATCH] AFP images without a matching end-structured field ID would cause errors
Date Tue, 03 Jul 2012 15:40:44 GMT

          Priority: P2
            Bug ID: 53502
          Assignee: fop-dev@xmlgraphics.apache.org
           Summary: [PATCH] AFP images without a matching end-structured
                    field ID would cause errors
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: rmeyer@hotmail.co.uk
          Hardware: PC
            Status: NEW
           Version: all
         Component: general
           Product: Fop

Created attachment 29026
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29026&action=edit
Code changes which now conform to the AFP specification for end structured

When trying to use an AFP image without a matching end structured field ID, an
error (Array index out of bounds) would occur. The MODCA specification [1]
states that the end structured field is valid in the following three states:
- An end structured field has no matching end tag id. In which case it will
match the last tag found
- The end tag ends with a FF FF value which, similar to no name will match any
opening tag.
- A matching id on both start and end tags which is the usual case.

I have updated the code to support all three of these cases and now images are
loaded successfully when generating an AFP document should one of these other
two cases arise. These same rules also apply to all other structured field
types and the code change will support these.

I have also added four new test cases which utilize four AFP images covering
each case above including a name mismatch (which is expected to throw an
exception). These will be attached to this patch shortly. Please note, as
listed in the patch these *.afp test files should go in
test/java/org/apache/fop/afp/ along with the AFPResourceUtilTestCase.java file

I will also add a fail example to this patch to show an example of it breaking.


You are receiving this mail because:
You are the assignee for the bug.

View raw message