[jboss-cvs] JBossAS SVN: r110528 - projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/resource/security.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 4 07:36:42 EST 2011


Author: mmoyses
Date: 2011-02-04 07:36:41 -0500 (Fri, 04 Feb 2011)
New Revision: 110528

Modified:
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java
Log:
SECURITY-563: fix for negative numbers

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java	2011-02-04 10:56:45 UTC (rev 110527)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/resource/security/SecureIdentityLoginModule.java	2011-02-04 12:36:41 UTC (rev 110528)
@@ -187,6 +187,14 @@
          {
             encoding[i + pad] = old[i];
          }
+         //SECURITY-563: handle negative numbers
+         if (n.signum() == -1)
+         {
+            for (int i = 0; i < newLength - length; i++)
+            {
+               encoding[i] = (byte) -1;
+            }
+         }
       }
       
       Cipher cipher = Cipher.getInstance("Blowfish");



More information about the jboss-cvs-commits mailing list