mirror of
https://github.com/google/brotli.git
synced 2026-04-05 21:52:51 +00:00
Merge pull request #1413 from leofernandesmo:fix-java-brotliinputstream-null-buffer
PiperOrigin-RevId: 889691589
This commit is contained in:
@@ -139,6 +139,9 @@ public class BrotliInputStream extends InputStream {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException {
|
public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException {
|
||||||
|
if (destBuffer == null) {
|
||||||
|
throw new NullPointerException("destBuffer is null");
|
||||||
|
}
|
||||||
if (destOffset < 0) {
|
if (destOffset < 0) {
|
||||||
throw new IllegalArgumentException("Bad offset: " + destOffset);
|
throw new IllegalArgumentException("Bad offset: " + destOffset);
|
||||||
} else if (destLen < 0) {
|
} else if (destLen < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user