Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault in MCM FFmpeg plugin occurred in memcpy #152

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

ko80
Copy link
Collaborator

@ko80 ko80 commented Jun 25, 2024

In mcm_read_packet() the length of the buffer received from media_proxy can be smaller than the configured frame size. Passing the size argument to memcpy() being larger than the source buffer size can lead to a segmentation fault.

This commit fixes this issue by passing the size argument to memcpy() as the lowest value between the configured frame size and the actual Rx buffer length.

In mcm_read_packet() the length of the buffer received from
media_proxy can be smaller than the configured frame size.
Passing the size argument to memcpy() being larger than the
source buffer size can lead to a segmentation fault.

This commit fixes this issue by passing the size argument to
memcpy() as the lowest value between the configured frame
size and the actual Rx buffer length.

Signed-off-by: Konstantin Ilichev <[email protected]>
@ko80 ko80 requested a review from Mionsz June 25, 2024 22:30
Copy link
Collaborator

@soopel soopel left a comment

Choose a reason for hiding this comment

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

Approved

@soopel soopel merged commit 4259a18 into OpenVisualCloud:main Jun 26, 2024
8 checks passed
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