intellij-fernflower icon indicating copy to clipboard operation
intellij-fernflower copied to clipboard

"Zip entry 'MANIFEST/MANIFEST.MF' tries to escape target directory" when decompiling 22w42a Minecraft client jar

Open 0x3C50 opened this issue 3 years ago • 3 comments

https://github.com/FabricMC/intellij-fernflower/blob/49f5561beca2d4efbf94762452858f032841b31e/src/org/jetbrains/java/decompiler/struct/StructContext.java#L143 seems to be the issue

Exception:

Exception in thread "main" java.lang.RuntimeException: Zip entry 'META-INF/MANIFEST.MF' tries to escape target directory
	at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:143)
	at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:86)
	at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:64)
	at org.jetbrains.java.decompiler.main.Fernflower.addSource(Fernflower.java:73)
	at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.addSource(ConsoleDecompiler.java:112)
	at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.main(ConsoleDecompiler.java:80)

Cmd line: java -jar fernflower/build/libs/fernflower.jar -dgs=true jars/mc.jar decomp

This also results in the same error: cd decomp; java -jar ../fernflower/build/libs/fernflower.jar -dgs=true ../jars/mc.jar .

Happens on fresh build with latest commit. No other logs other than the exception are visible.

0x3C50 avatar Oct 20 '22 10:10 0x3C50

If you're looking for a fix: Using an absolute path for the jar rather than a relative path fixed this for me. But its still not ideal

Veeloxfire avatar Nov 21 '22 16:11 Veeloxfire

If you're looking for a fix: Using an absolute path for the jar rather than a relative path fixed this for me. But its still not ideal

I've tried that too, didn't work either

0x3C50 avatar Nov 21 '22 16:11 0x3C50

thx u very much :)

W01fh4cker avatar Mar 04 '23 08:03 W01fh4cker