lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.09k stars 248 forks source link

NPE in LZ4FrameInputStream#available #180

Open lpireyn opened 2 years ago

lpireyn commented 2 years ago

The available method in class LZ4FrameInputStream assumes the buffer field is not null. However, that field is set in the private readHeader method which may not have been executed yet. This results in a NullPointerException being thrown by the available method if it is called right after the LZ4FrameInputStream is created.

odaira commented 2 years ago

Thanks for the report! I'll take a look into the problem.

darkleaf commented 2 years ago

up