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

in box_code_base.c line 8637 has a heap overflow #1262

Closed
3 tasks
Ch111p opened this issue Jul 5, 2019 · 2 comments
Closed
3 tasks

in box_code_base.c line 8637 has a heap overflow #1262

Ch111p opened this issue Jul 5, 2019 · 2 comments

Comments

@Ch111p
Copy link

Ch111p commented Jul 5, 2019

Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

in box_code_base.c line 8637 has a heap overflow.

GF_Err txtc_Read(GF_Box *s, GF_BitStream *bs)
{
	u32 size, i;
	char *str;
	GF_TextConfigBox *ptr = (GF_TextConfigBox*)s;

	size = (u32) ptr->size;
	str = (char *)gf_malloc(sizeof(char)*size);

	i=0;

	while (size) {
		str[i] = gf_bs_read_u8(bs);
		size--;
		if (!str[i])
			break;
		i++;
	}
	if (i) ptr->config = gf_strdup(str);
	gf_free(str);

	return GF_OK;
}

When str is full without '\x00', strdup will make a heap overflow.

jeanlf added a commit that referenced this issue Jul 5, 2019
@jeanlf
Copy link
Member

jeanlf commented Jul 5, 2019

now fixed, thanks for the report

@jeanlf jeanlf closed this as completed Jul 5, 2019
@carnil
Copy link

carnil commented Sep 9, 2021

CVE-2020-19750 was assigned for this issue.

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

3 participants