I have split out the patch I provided into two pieces.  Attached is the
piece for 605940.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff -ur xmlgraphics-commons.old/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java xmlgraphics-commons.work/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java
--- xmlgraphics-commons.old/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java	2010-12-04 18:46:09.000000000 +0000
+++ xmlgraphics-commons.work/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java	2010-12-04 20:35:47.000000000 +0000
@@ -188,6 +191,12 @@
                 throw new SAXException("Unexpected element in the RDF namespace: " + localName);
             }
         } else {
+            String about = attributes.getValue(XMPConstants.RDF_NAMESPACE, "about");
+            if (this.contextStack.peek().equals(this.meta) && (about != null)) {
+                //rdf:RDF is the parent, so this is a top-level item that isn't
+                //an rdf:Description, which isn't allowed.
+                throw new SAXException("Top-level element " + qName + " not an rdf:Description");
+            }
             if (getCurrentPropName() != null) {
                 //Structure (shorthand form)
                 startStructure();

Attachment: signature.asc
Description: Digital signature

Reply via email to