Mercurial > hg > release > icedtea6-1.8
view patches/security/20120214/7088367.patch @ 2180:08e7c18e12c1
Add 2012/02/14 security patches.
2012-02-08 Omair Majid <omajid@redhat.com>
* NEWS: Update with security fixes.
* Makefile.am
(SECURITY_PATCHES): Add security patches.
(SPECIAL_SECURITY_PATCH): Add new variable.
(ICEDTEA_PATCHES): Add security patch that epends on backport.
* patches/security/20120214/7082299.patch,
* patches/security/20120214/7088367.patch,
* patches/security/20120214/7110683.patch,
* patches/security/20120214/7110687.patch,
* patches/security/20120214/7110700.patch,
* patches/security/20120214/7110704.patch,
* patches/security/20120214/7112642.patch,
* patches/security/20120214/7118283.patch,
* patches/security/20120214/7126960.patch: New security fixes.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Fri, 10 Feb 2012 11:25:13 +0000 |
parents | |
children |
line wrap: on
line source
# HG changeset patch # User amenkov # Date 1319622989 -14400 # Node ID b34a3ed0c8f2f6b9121d38ed330430d913f8a385 # Parent cdc68d7a17dd412402b100dc427abbe0a90cf2ab 7088367: JavaSound security issue (12865443) Reviewed-by: denis diff --git a/src/share/classes/com/sun/media/sound/DirectAudioDevice.java b/src/share/classes/com/sun/media/sound/DirectAudioDevice.java --- openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java +++ openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java @@ -771,7 +771,7 @@ class DirectAudioDevice extends Abstract if (off < 0) { throw new ArrayIndexOutOfBoundsException(off); } - if (off + len > b.length) { + if ((long)off + (long)len > (long)b.length) { throw new ArrayIndexOutOfBoundsException(b.length); } @@ -1000,7 +1000,7 @@ class DirectAudioDevice extends Abstract if (off < 0) { throw new ArrayIndexOutOfBoundsException(off); } - if (off + len > b.length) { + if ((long)off + (long)len > (long)b.length) { throw new ArrayIndexOutOfBoundsException(b.length); } if (!isActive() && doIO) { diff --git a/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java b/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java --- openjdk/jdk/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java +++ openjdk/jdk/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java @@ -130,6 +130,12 @@ public class SoftMixingSourceDataLine ex if (len % framesize != 0) throw new IllegalArgumentException( "Number of bytes does not represent an integral number of sample frames."); + if (off < 0) { + throw new ArrayIndexOutOfBoundsException(off); + } + if ((long)off + (long)len > (long)b.length) { + throw new ArrayIndexOutOfBoundsException(b.length); + } byte[] buff = cycling_buffer; int buff_len = cycling_buffer.length;