-
Notifications
You must be signed in to change notification settings - Fork 13
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
Possible buffer over-read #6
Comments
That would be caused by the bit reader Lines 34 to 68 in 6a9e00f
Depending on the size read, the current code may end up accessing one more byte than necessary. The official code does the same thing, but it always uses a buffer that's the size of the largest possible superframe, or 2048 bytes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While doing some simple memtests (https://drmemory.org/) I get errors that I suspect mean BitReaderCxt in Atrac9Decode is reading over data buffer and not clamping to superframeSize. Doesn't seem to affect decoding though.
If I alloc a buffer with exactly
superframeSize
I multiple errors like this:Which apparently refer to reads outside alloc'ed buffers: https://drmemory.org/docs/page_unaddr.html
If I instead alloc with some leeway I get no errors.
It doesn't seem related to
sample_buffer
or other lib calls (if I mod buffer/remove calls I still get those errors).The text was updated successfully, but these errors were encountered: