{"record":{"id":"2b1d2f4dac80e76f","repo":"prestodb/presto","slug":"the-requested-unsigned-long-value-is-too-large-for","errorCode":null,"errorMessage":"The requested unsigned long value is too large for Java's signed values. This Zip file is unsupported","messagePattern":"The requested unsigned long value is too large for Java's signed values\\. This Zip file is unsupported","errorType":"exception","errorClass":"ZipException","httpStatus":null,"severity":"error","filePath":"presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipUtil.java","lineNumber":142,"sourceCode":"        return (h << 56) | (g << 48) | (f << 40) | (e << 32) | (d << 24) | (c << 16) | (b << 8) | a;\n    }\n\n    public static int getUnsignedShort(byte[] source, int offset)\n    {\n        return get16(source, offset) & 0xffff;\n    }\n\n    public static long getUnsignedInt(byte[] source, int offset)\n    {\n        return get32(source, offset) & 0xffffffffL;\n    }\n\n    public static long getUnsignedLong(byte[] source, int offset)\n            throws ZipException\n    {\n        long result = get64(source, offset);\n        if (result < 0) {\n            throw new ZipException(\"The requested unsigned long value is too large for Java's signed \"\n                    + \"values. This Zip file is unsupported\");\n        }\n        return result;\n    }\n\n    /**\n     * Checks if the unix timestamp is representable as a valid DOS timestamp.\n     *\n     * <p>See <a href=\"http://www.pkware.com/documents/casestudies/APPNOTE.TXT\">ZIP Format</a> for\n     * a general description of the date a time fields (Section 4.4.6) and\n     * <a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/ms724247.aspx\">DOS date\n     * format</a> for a detailed description of the format.\n     */\n    public static boolean isValidInDos(long timeMillis)\n    {\n        Calendar time = Calendar.getInstance();\n        time.setTimeInMillis(timeMillis);\n        Calendar minTime = Calendar.getInstance();","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipUtil.java#L124-L160","documentation":"getUnsignedLong reads 8 bytes as an unsigned 64-bit value, but Java longs are signed; when the raw value exceeds Long.MAX_VALUE it cannot be represented, so this ZipException rejects the unsupported zip file.","triggerScenarios":"Thrown at presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipUtil.java:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject or regenerate the ZIP data producing the oversized unsigned value","Use ZIP64-aware handling where supported"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}