Skip to content

NPE in LZ4FrameInputStream#available #39

@dldnhf

Description

@dldnhf

I'm duplicating the open issue lz4#180 here:

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.

This bug was introduced with lz4#146, as no check has been added to available like to other methods.

I'll take the liberty of creating a PR for it, hope that's fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions