Skip to content

command: reject negative offset for overlay-add#17521

Merged
sfan5 merged 1 commit intompv-player:masterfrom
sfan5:abcdef
Mar 9, 2026
Merged

command: reject negative offset for overlay-add#17521
sfan5 merged 1 commit intompv-player:masterfrom
sfan5:abcdef

Conversation

@sfan5
Copy link
Member

@sfan5 sfan5 commented Mar 7, 2026

in theory someone could have been using a negative offset with the pointer argument, but that doesn't really make sense when you can just adjust the pointer value yourself before calling.

@sfan5 sfan5 changed the title command: check file size before mmap'ing for overlay-add command: reject negative offset for overlay-add Mar 8, 2026
fd = open(file, O_RDONLY | O_BINARY | O_CLOEXEC);
}
int map_size = 0;
size_t map_size = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not touching this would be nice as it'd avoid unnecessary conflict with #17520. Not a big deal tho.

@sfan5 sfan5 merged commit 07c3ff3 into mpv-player:master Mar 9, 2026
27 of 29 checks passed
@sfan5 sfan5 deleted the abcdef branch March 9, 2026 14:44
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