-
Notifications
You must be signed in to change notification settings - Fork 25
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
histogram: malloc: Cannot allocate memory #5
Comments
the bytes variable is negative when its passed to malloc. I think its trying to allocate enough memory to hold the file? I modified it to simply allocate the size of the test image but the result doesn't seem correct?
|
It's not immediately obvious what kind of file
Now the only way to set
The first four bytes of this file are 0000 25cc, (which is 0x25cc as it's big endian) which is indeed 9676.
So in conclusion this isn't really an issue with |
The command histogram always returns an error.
$ ./src/histogram tests/test.jpg
histogram: malloc: Cannot allocate memory
The text was updated successfully, but these errors were encountered: