8273290: Enhance sound handling
Reviewed-by: rhalade, ahgross, prr, jdv
This commit is contained in:
parent
78b2c8419b
commit
ae7877df2e
src/java.desktop/share/classes/com/sun/media/sound
@ -392,6 +392,10 @@ final class SMFParser {
|
||||
// meta
|
||||
int metaType = readUnsigned();
|
||||
int metaLength = (int) readVarInt();
|
||||
if (metaLength < 0) {
|
||||
throw new InvalidMidiDataException("length out of bounds: "
|
||||
+ metaLength);
|
||||
}
|
||||
final byte[] metaData;
|
||||
try {
|
||||
metaData = new byte[metaLength];
|
||||
|
@ -73,6 +73,10 @@ public final class WaveFloatFileReader extends SunFileReader {
|
||||
samplerate = chunk.readUnsignedInt();
|
||||
/* framerate = */chunk.readUnsignedInt();
|
||||
framesize = chunk.readUnsignedShort();
|
||||
if (framesize == 0) {
|
||||
throw new UnsupportedAudioFileException(
|
||||
"Can not process audio format with 0 frame size");
|
||||
}
|
||||
bits = chunk.readUnsignedShort();
|
||||
}
|
||||
if (chunk.getFormat().equals("data")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user