RFR: 8282578: AIOOBE in javax.sound.sampled.Clip
Alexander Zuev
kizune at openjdk.java.net
Sat Jun 4 13:49:31 UTC 2022
On Fri, 3 Jun 2022 21:15:21 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> Probably it is better to check the data length for each sys message and discard it if the data is too small? Ignoring all possible AIOOBE from this large method which calls many other large methods from SoftVoice/SoftTuning may hide some other bugs.
No, because determining the correct length of the message will require basically to parse it all, the correct length could be a 2 bytes or hundreds of bytes - in order to determine we have to process the message completely.
-------------
PR: https://git.openjdk.java.net/jdk/pull/9016
More information about the client-libs-dev
mailing list