Skip to content

Snappy.maxCompressedLength can return a negative size #671

@bersprockets

Description

@bersprockets

This is applicable to snappy-java-1.1.10.7.jar.

bash-3.2$ jshell --class-path /Users/<redacted>/jars/snappy-java-1.1.10.7.jar
|  Welcome to JShell -- Version 21.0.6
|  For an introduction type: /help intro

jshell> import org.xerial.snappy.Snappy;
import org.xerial.snappy.Snappy;

jshell> Snappy.maxCompressedLength(1840700246);
Snappy.maxCompressedLength(1840700246);
$2 ==> -2147483644

jshell> 

This could very well be an appropriate response. But I wanted to verify before I file an issue with a second library which assumes that the result of Snappy.maxCompressedLength is always usable as a buffer size.

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