-
Notifications
You must be signed in to change notification settings - Fork 419
Added size limit check for buffer stride #567
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
Conversation
|
This does still not do the entire job. There is some "buffer range out of bounds" check in buffer.h line 251. First that check is wrong IMHO, as it should test to buffer_in->numBytes only on the right hand side and not multiply by stride_in. |
|
That check in buffer.h should better be placed inside rtcore.cpp actually, thus all valid checks are at main API wrapper file. |
|
The check offset + Nstride >= buffer_size can be written as Nstride >= buffer_size - offset. Also check first if offset <= buffer_size. |
|
@svenwoop can you take another look? |
Preventing possible wrap to zero when itemCount * bufferStride exceed 64 bit uint limit.