processing / processing/processing4

Export path leaks streams in java/src/processing/mode/java/JavaBuild.java and can hang on malformed jar entries

Offen
#1,451 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@avinxshKD arbeitet bereits daran.

Seit 27.2.2026.

Vorherrschende Sprache
Java
Sterne
494
Forks
183
Ø Merge
4 Std. 39 Min.
Gemergte PRs (30 T.)
3

Beschreibung

Not seeing this reported yet, so filing it.

While checking export code, spotted a few stream/zip handling bugs in java/src/processing/mode/java/JavaBuild.java:

  • new FileInputStream(...) is passed into saveStream() in multiple places, but that source stream is never closed.

  • ZipFile.getInputStream(entry) is also left open.

  • ZipFile itself is only closed on the happy path.

  • In the jar-entry read loop, if read() returns -1, remaining goes the wrong way and the loop can run forever.

This is in the Export Application path, so it’s not edge-only. Repeated exports can leak FDs/handles (worse on Windows due to file locks), and a bad/truncated jar can stall export.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.