Skip to content

fix(preview): close the streams on an invalid 64-bit atom size - #67397

Open
skjnldsv wants to merge 1 commit into
masterfrom
fix/movie-sparse-file-leak
Open

skjnldsv wants to merge 1 commit into
masterfrom
fix/movie-sparse-file-leak

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Dec 1, 2026

Copy link
Copy Markdown
Member

Summary

getSparseFile() closed the video stream and the sparse file on every early return except the one for a 64-bit atom size of 0, so both stayed open on a malformed MP4/MOV. It closes them now, like the others.

The temp file itself is still only removed by the temp cleanup at the end of the request, as on the other failure paths.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

getSparseFile() closed the video stream and the sparse file on every
early return but this one, so both stayed open on a malformed MP4/MOV.

Fixes #67354

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv requested a review from a team as a code owner December 1, 2026 19:45
@skjnldsv
skjnldsv requested review from Altahrim and icewind1991 and removed request for a team December 1, 2026 19:45
@skjnldsv skjnldsv added this to the Nextcloud 36 milestone Dec 1, 2026
@skjnldsv skjnldsv self-assigned this Dec 1, 2026
@skjnldsv
skjnldsv requested a review from susnux December 1, 2026 19:48
@CarlSchwan
CarlSchwan enabled auto-merge December 2, 2026 05:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Movie preview: getSparseFile() leaks file handles and the temp file on an invalid 64-bit atom size

3 participants