mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1988] Fix pmtentry clean #2790
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1988
State: closed
Merged: No
[FIX] Critical Rust FFI memory safety: avoid returning pointer to stack-allocated PMTEntry
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
PR fixes a use-after-scope (dangling pointer) bug in the Rust FFI layer.
The implementation of:
previously returned a raw pointer derived from a stack-allocated PMTEntry.
Once the function returned, the stack frame was destroyed, leaving the pointer
dangling and causing undefined behavior in Rust.
This is a correctness and memory-safety issue independent of C-side usage,
tests, or call order.
Fixes #1986