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

A Null Pointer Dereference In function gf_filter_pck_get_data #1728

Closed
treebacker opened this issue Apr 2, 2021 · 0 comments
Closed

A Null Pointer Dereference In function gf_filter_pck_get_data #1728

treebacker opened this issue Apr 2, 2021 · 0 comments

Comments

@treebacker
Copy link

treebacker commented Apr 2, 2021

In filters/reframe_latm.c:480. There is a Null Pointer Dereference, when call gf_filter_pck_get_data.
The first arg pck may be null with a crafted mp4 file.

As below code shows:
`

if (!pck) {
	if (gf_filter_pid_is_eos(ctx->ipid)) {  // check1
		if (!ctx->latm_buffer_size) {     // check2
			if (ctx->opid)
				gf_filter_pid_set_eos(ctx->opid);
			if (ctx->src_pck) gf_filter_pck_unref(ctx->src_pck);
			ctx->src_pck = NULL;
			return GF_EOS;
		}
	} else {
		return GF_OK;
	}
}

`
Although there are checks to test if pck is null. But when check1 is true and check2 is false, the checks are nothing.
The command line:
bug7_cmd
In gdb:
bug7

The crafted file:
bug1.zip

@jeanlf jeanlf closed this as completed in b2db2f9 Apr 8, 2021
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

No branches or pull requests

1 participant