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

libdivsufsort-lite crashes #3

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 2 comments
Open

libdivsufsort-lite crashes #3

GoogleCodeExporter opened this issue Mar 17, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. 32-bit OS, with 2 Gb RAM or more
2. Take a file with size>=1Gb i.e. (1<<30) bytes
3. Run libdivsufsort-lite.exe BIGFILE

What is the expected output? What do you see instead?

Expected behaviour:
> sufcheck: Done.
It simply crashes instead.

What version of the product are you using? On what operating system?

libdivsufsort-lite 2.0.0 on Windows XP with 3 GB RAM.

Please provide any additional information below.

It crashes because of overflow in suftest.c , line 163:

>  SA = (int *)malloc((size_t)n * sizeof(int));

if (sizeof(size_t)==4 && sizeof(int)==4 && n>=(1<<30))
then ((size_t)n * sizeof(int))==((n&4)&((1<<32)-1))


Original issue reported on code.google.com by [email protected] on 3 Oct 2011 at 1:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant