Hello community,

here is the log from the commit of package xerces-j2 for openSUSE:Factory 
checked in at 2016-02-17 10:32:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xerces-j2 (Old)
 and      /work/SRC/openSUSE:Factory/.xerces-j2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xerces-j2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xerces-j2/xerces-j2.changes      2014-08-01 
19:26:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xerces-j2.new/xerces-j2.changes 2016-02-17 
12:26:22.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 11 15:12:31 UTC 2016 - [email protected]
+
+- Add patches for bnc#814241 upstream#1616
+  * arrays-doubling.patch
+  * scan-pseudo-attribute.patch
+
+-------------------------------------------------------------------

New:
----
  arrays-doubling.patch
  scan-pseudo-attribute.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xerces-j2.spec ++++++
--- /var/tmp/diff_new_pack.Q3BofI/_old  2016-02-17 12:26:23.000000000 +0100
+++ /var/tmp/diff_new_pack.Q3BofI/_new  2016-02-17 12:26:23.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xerces-j2
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,12 +30,16 @@
 Source3:        %{name}-version.1
 Source4:        %{name}-constants.sh
 Source5:        %{name}-constants.1
+# PATCH-FIX-UPSTREAM bnc#814241 XERCESJ-1616
+Patch0:         arrays-doubling.patch
+Patch1:         scan-pseudo-attribute.patch
+BuildRequires:  dos2unix
 # some build requirements removed to enable jpackage bootstrap. this is
 # the first package built, and we use the libraries in the tools subdir
 # for it.
-BuildRequires:  java-1_5_0-gcj-compat-devel
 #!BuildIgnore:  java-1_6_0-openjdk java-1_6_0-openjdk-devel
 #!BuildIgnore:  antlr antlr-java
+BuildRequires:  java-1_5_0-gcj-compat-devel
 BuildRequires:  javapackages-tools
 BuildRequires:  unzip
 Requires(post): update-alternatives
@@ -160,6 +164,10 @@
 %setup -q -T -a 1 -D -n xerces-%{cvs_version}
 %setup -q -T -D -n xerces-%{cvs_version}
 
+find -type f -print |xargs -i dos2unix {}
+%patch0 -p1
+%patch1 -p1
+
 echo 'javac.target=1.5' > build.properties
 echo 'javac.source=1.5' >> build.properties
 

++++++ arrays-doubling.patch ++++++
--- xerces/src/org/apache/xerces/util/XMLStringBuffer.java      2006/09/18 
05:12:57     447241
+++ xerces/src/org/apache/xerces/util/XMLStringBuffer.java      2013/07/25 
18:13:37
@@ -111,12 +111,13 @@ 
      */
     public void append(char c) {
         if (this.length + 1 > this.ch.length) {
-                    int newLength = this.ch.length*2;
-                    if (newLength < this.ch.length + DEFAULT_SIZE)
-                        newLength = this.ch.length + DEFAULT_SIZE;
-                    char[] newch = new char[newLength];
-                    System.arraycopy(this.ch, 0, newch, 0, this.length);
-                    this.ch = newch;
+            int newLength = this.ch.length * 2;
+            if (newLength < this.ch.length + DEFAULT_SIZE) {
+                newLength = this.ch.length + DEFAULT_SIZE;
+            }
+            char[] newch = new char[newLength];
+            System.arraycopy(this.ch, 0, newch, 0, this.length);
+            this.ch = newch;
         }
         this.ch[this.length] = c;
         this.length++;
@@ -130,9 +131,10 @@ 
     public void append(String s) {
         int length = s.length();
         if (this.length + length > this.ch.length) {
-            int newLength = this.ch.length*2;
-            if (newLength < this.length + length + DEFAULT_SIZE)
+            int newLength = this.ch.length * 2;
+            if (newLength < this.length + length + DEFAULT_SIZE) {
                 newLength = this.ch.length + length + DEFAULT_SIZE;
+            }
             char[] newch = new char[newLength];            
             System.arraycopy(this.ch, 0, newch, 0, this.length);
             this.ch = newch;
@@ -150,7 +152,11 @@ 
      */
     public void append(char[] ch, int offset, int length) {
         if (this.length + length > this.ch.length) {
-            char[] newch = new char[this.ch.length + length + DEFAULT_SIZE];
+            int newLength = this.ch.length * 2;
+            if (newLength < this.length + length + DEFAULT_SIZE) {
+                newLength = this.ch.length + length + DEFAULT_SIZE;
+            }
+            char[] newch = new char[newLength];
             System.arraycopy(this.ch, 0, newch, 0, this.length);
             this.ch = newch;
         }
++++++ scan-pseudo-attribute.patch ++++++
--- xerces/src/org/apache/xerces/impl/XMLScanner.java   2013/07/03 18:25:06     
1499505
+++ xerces/src/org/apache/xerces/impl/XMLScanner.java   2013/07/03 18:29:43
@@ -542,7 +542,7 @@ 
         // document is until we scan the encoding declaration
         // you cannot reliably read any characters outside
         // of the ASCII range here. -- mrglavas
-        String name = fEntityScanner.scanName();
+        String name = scanPseudoAttributeName();
         XMLEntityManager.print(fEntityManager.getCurrentEntity());
         if (name == null) {
             reportFatalError("PseudoAttrNameExpected", null);
@@ -599,6 +599,35 @@ 
     } // scanPseudoAttribute(XMLString):String
     
     /**
+     * Scans the name of a pseudo attribute. The only legal names
+     * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'.
+     * 
+     * @return the name of the pseudo attribute or <code>null</code>
+     * if a legal pseudo attribute name could not be scanned.
+     */
+    private String scanPseudoAttributeName() throws IOException, XNIException {
+        final int ch = fEntityScanner.peekChar();
+        switch (ch) {
+            case 'v':
+                if (fEntityScanner.skipString(fVersionSymbol)) {
+                    return fVersionSymbol;
+                }
+                break;
+            case 'e':
+                if (fEntityScanner.skipString(fEncodingSymbol)) {
+                    return fEncodingSymbol;
+                }
+                break;
+            case 's':
+                if (fEntityScanner.skipString(fStandaloneSymbol)) {
+                    return fStandaloneSymbol;
+                }
+                break;
+        }
+        return null;
+    } // scanPseudoAttributeName()
+    
+    /**
      * Scans a processing instruction.
      * <p>
      * <pre>

Reply via email to