Skip to content

demux_cue: fix audio file lookup inside subdirectory#17868

Open
llyyr wants to merge 1 commit into
mpv-player:masterfrom
llyyr:fix/cue-try-open
Open

demux_cue: fix audio file lookup inside subdirectory#17868
llyyr wants to merge 1 commit into
mpv-player:masterfrom
llyyr:fix/cue-try-open

Conversation

@llyyr
Copy link
Copy Markdown
Contributor

@llyyr llyyr commented May 3, 2026

The FILE field in a CUE sheet may contain a relative path with subdirectories. It's not clear if this usecase is intended to be supported, as none of the usual CD/DVD ripping tool generates this type of FILE field in the CUE sheet. The specification is old and abandoned, so this will likely never be clarified and it doesn't cost much to support it so might as well...

The FILE field in a CUE sheet may contain a relative path with
subdirectories. It's not clear if this usecase is intended to be
supported, as none of the usual CD/DVD ripping tool generates this type
of FILE field in the CUE sheet. The specification is old and abandoned,
so this will likely never be clarified and it doesn't cost much to
support it so might as well...
@llyyr llyyr force-pushed the fix/cue-try-open branch from 15aaa34 to 3b5359b Compare May 3, 2026 07:48
Comment thread demux/demux_cue.c
MP_WARN(tl, "CUE: Invalid audio filename in .cue file!\n");
} else {
char *fullname = mp_path_join_bstr(ctx, dirname, base_filename);
char *fullname = mp_path_join_bstr(ctx, dirname, bstr0(filename));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wouldn't prevent filename from behind something like ../../foo, but I guess it shouldn't.

Copy link
Copy Markdown
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants