提交 e7f9023e 编写于 作者: S serb

8054431: Some of the input validation in the javasound is too strict

Reviewed-by: azvegint, alexsch
上级 777a1ff2
......@@ -74,14 +74,13 @@ public final class RIFFReader extends InputStream {
fourcc[0] = (byte) b;
readFully(fourcc, 1, 3);
this.fourcc = new String(fourcc, "ascii");
final long size = readUnsignedInt();
if (size > Integer.MAX_VALUE) {
throw new RIFFInvalidDataException("Chunk size too big");
}
ckSize = size;
avail = size;
ckSize = readUnsignedInt();
avail = ckSize;
if (getFormat().equals("RIFF") || getFormat().equals("LIST")) {
if (avail > Integer.MAX_VALUE) {
throw new RIFFInvalidDataException("Chunk size too big");
}
byte[] format = new byte[4];
readFully(format);
this.riff_type = new String(format, "ascii");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册