Skip to content

visionbuf: fix incorrect length passed to munmap #618

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

Merged
merged 2 commits into from
Aug 4, 2024

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Jun 4, 2024

fixed a bug in VisionBuf::free() where an incorrect length parameter was passed to munmap(), potentially causing memory issues.

In the allocate() method, the length of the memory mapping (mmap_len) was calculated as this->len + sizeof(uint64_t). However, in the free() method, only this->len was used as the length parameter for munmap(), resulting in an incorrect length.

@adeebshihadeh adeebshihadeh merged commit 23cb05a into commaai:master Aug 4, 2024
8 checks passed
@deanlee deanlee deleted the fix_munmap branch August 5, 2024 03:37
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