{"record":{"id":"c802e0e7d5a3e39e","repo":"prestodb/presto","slug":"invalid-local-header-offset","errorCode":null,"errorMessage":"invalid local header offset","messagePattern":"invalid local header offset","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipFileEntry.java","lineNumber":326,"sourceCode":"    }\n\n    /**\n     * Sets the external file attributes of the entry.\n     */\n    public void setExternalAttributes(int externalAttributes)\n    {\n        this.externalAttributes = externalAttributes;\n    }\n\n    public int getExternalAttributes()\n    {\n        return externalAttributes;\n    }\n\n    void setLocalHeaderOffset(long localHeaderOffset)\n    {\n        if (localHeaderOffset < 0) {\n            throw new IllegalArgumentException(\"invalid local header offset\");\n        }\n        if (localHeaderOffset > 0xffffffffL) {\n            featureSet.add(Feature.ZIP64_OFFSET);\n        }\n        else {\n            featureSet.remove(Feature.ZIP64_OFFSET);\n        }\n        this.localHeaderOffset = localHeaderOffset;\n    }\n\n    public long getLocalHeaderOffset()\n    {\n        return localHeaderOffset;\n    }\n\n    public void setExtra(ExtraDataList extra)\n    {\n        checkArgument(extra != null, \"Zip file data could not be null\");","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipFileEntry.java#L308-L344","documentation":"Sanity check in the ZIP entry writer: setLocalHeaderOffset was given a negative offset, which cannot point at any local file header in the archive. Reached when reading entries (read path), it signals corrupt or maliciously crafted offset data in the ZIP structure.","triggerScenarios":"Thrown at presto-druid/src/main/java/com/facebook/presto/druid/zip/ZipFileEntry.java:326 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the producer writing the entry offsets","Validate archive integrity (offsets within file bounds) before writing"],"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"}