https://github.com/gpac/gpac/blob/4a8000c4595bcff82fe54afc4f6a515c2e1322ba/src/filters/reframe_rawvid.c#L261-L269

If it is possible that`ctx->frame_size` smaller than `ctx->nb_bytes_in_frame` and result in a heap overflow in the `memcpy()`?
A question about possible heap overflow in rawvidreframe_process()
This is a GitHub Issue
repo:gpac
owner:gpac
Title : A question about possible heap overflow in rawvidreframe_process()
Issue date:

--- start body ---
https://github.com/gpac/gpac/blob/4a8000c4595bcff82fe54afc4f6a515c2e1322ba/src/filters/reframe_rawvid.c#L261-L269

If it is possible that`ctx->frame_size` smaller than `ctx->nb_bytes_in_frame` and result in a heap overflow in the `memcpy()`?
--- end body ---

The issue raises a concern about a potential heap overflow in the rawvidreframe_process function due to a possible mismatch between ctx->frame_size and ctx->nb_bytes_in_frame. If ctx->frame_size is indeed smaller than ctx->nb_bytes_in_frame, this could lead to a buffer overflow when memcpy is called, which can be exploited to overwrite adjacent memory and potentially lead to arbitrary code execution or application crashes.