In source code `filters/reframe_mpgvid.c:643`.
As below code shows:
`

		if (remain<5) {
			memcpy(ctx->hdr_store, start, remain);
			ctx->bytes_in_header = remain;
			break;
		}


`
Where only check `remain < 5`, but not `remain < 0`.
So when remain is a negative number with a crafted mp4 file, the memcpy crashes.

In command line:
![bug2_cmd](https://user-images.githubusercontent.com/44844446/113467266-901f0000-9474-11eb-861e-8ae623b62281.png)

In gdb:
![bug2](https://user-images.githubusercontent.com/44844446/113467268-92815a00-9474-11eb-81dc-e66d1804248c.png)

The crafted mp4 file:
[bug2.zip](https://github.com/gpac/gpac/files/6251873/bug2.zip)


A Integer Overflow in function mpgviddmx_process
This is a GitHub Issue
repo:gpac
owner:gpac
Title : A Integer Overflow in function mpgviddmx_process
Issue date:

--- start body ---
In source code `filters/reframe_mpgvid.c:643`.
As below code shows:
`

		if (remain<5) {
			memcpy(ctx->hdr_store, start, remain);
			ctx->bytes_in_header = remain;
			break;
		}


`
Where only check `remain < 5`, but not `remain < 0`.
So when remain is a negative number with a crafted mp4 file, the memcpy crashes.

In command line:
![bug2_cmd](https://user-images.githubusercontent.com/44844446/113467266-901f0000-9474-11eb-861e-8ae623b62281.png)

In gdb:
![bug2](https://user-images.githubusercontent.com/44844446/113467268-92815a00-9474-11eb-81dc-e66d1804248c.png)

The crafted mp4 file:
[bug2.zip](https://github.com/gpac/gpac/files/6251873/bug2.zip)


--- end body ---
