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

An integer overflow bug of wav2swf #52

Open
ghost opened this issue Nov 13, 2017 · 4 comments
Open

An integer overflow bug of wav2swf #52

ghost opened this issue Nov 13, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 13, 2017

dest->data = (unsigned char*)malloc((int)(samplelen*ratio*2)+128);

when malloc.
there is an integer overflow bug:
(samplelenratio2)+128
that make the malloc failed.

so samples is 0
https://github.com/matthiaskramm/swftools/blob/master/src/wav2swf.c#L238

when memcpy use samples,it cause a null pointer dereference bug
memcpy(samples2, samples, numsamples*sizeof(U16));

@NicoleG25
Copy link

Is there any plan to address this?
Please note that CVE-2017-16868 was assigned.
@matthiaskramm

@matthiaskramm
Copy link
Owner

Yes, it would be good to fix this. I'll take a PR.

@yoya
Copy link
Contributor

yoya commented Jan 17, 2020

I think PR#75 will solve 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