Skip to content

Fix possible null dereference when continue_album=0 - #1351

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
pgaskin:continue-album-null-strcmp
Sep 8, 2024
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
pgaskin:continue-album-null-strcmp

Conversation

@pgaskin

@pgaskin pgaskin commented Aug 6, 2024

Copy link
Copy Markdown
Member

If continue_album=0 and the current or next track doesn't have album metadata, a strcmp with a null pointer will be done at the end of the track. Ensure track_info.album is non-null like other parts of cmus.

The continue_album option was added in f3ed07e.

@pgaskin

pgaskin commented Sep 2, 2024

Copy link
Copy Markdown
Member Author

@flyingmutant

@gavtroy gavtroy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fixes #1305.

If continue_album=0 and the current or next track doesn't have album
metadata, a strcmp with a null pointer will be done at the end of the
track. Ensure track_info.album is non-null like other parts of cmus.

The continue_album option was added in f3ed07e.
@flyingmutant
flyingmutant force-pushed the continue-album-null-strcmp branch from 106e10b to 602f07b Compare September 8, 2024 10:41
@flyingmutant
flyingmutant merged commit 76822eb into cmus:master Sep 8, 2024
@flyingmutant

Copy link
Copy Markdown
Member

Thanks! Merged.

@pgaskin
pgaskin deleted the continue-album-null-strcmp branch September 11, 2024 15:00
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.

3 participants