Mercurial > hg > release > icedtea6-1.6
view patches/security/icedtea-6863503.patch @ 1692:2c854193cc9d
Add latest security patches
2009-11-03 Martin Matejovic <mmatejov@redhat.com>
* patches/security/icedtea-6862968.patch
* patches/security/icedtea-6863503.patch
* patches/security/icedtea-6864911.patch
* patches/security/icedtea-6872357.patch
* patches/security/icedtea-6874643.patch
* Makefile.am: apply the above
author | Martin Matejovic <mmatejov@redhat.com> |
---|---|
date | Tue, 03 Nov 2009 17:50:20 +0100 |
parents | |
children |
line wrap: on
line source
--- old/src/share/classes/java/security/MessageDigest.java Thu Sep 24 22:22:15 2009 +++ openjdk/jdk/src/share/classes/java/security/MessageDigest.java Thu Sep 24 22:22:15 2009 @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -414,16 +414,17 @@ * * @return true if the digests are equal, false otherwise. */ - public static boolean isEqual(byte digesta[], byte digestb[]) { - if (digesta.length != digestb.length) + public static boolean isEqual(byte[] digesta, byte[] digestb) { + if (digesta.length != digestb.length) { return false; + } + int result = 0; + // time-constant comparison for (int i = 0; i < digesta.length; i++) { - if (digesta[i] != digestb[i]) { - return false; - } + result |= digesta[i] ^ digestb[i]; } - return true; + return result == 0; } /**