mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
java: add explicit null check in BrotliInputStream.read
This commit is contained in:
@@ -139,6 +139,9 @@ public class BrotliInputStream extends InputStream {
|
||||
*/
|
||||
@Override
|
||||
public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException {
|
||||
if (destBuffer == null) {
|
||||
throw new NullPointerException("destBuffer is null");
|
||||
}
|
||||
if (destOffset < 0) {
|
||||
throw new IllegalArgumentException("Bad offset: " + destOffset);
|
||||
} else if (destLen < 0) {
|
||||
|
||||
Reference in New Issue
Block a user