-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
KERNEL: Crash at HTTP fast buffer grow #848
Comments
It seems that a request without a length was POSTed.
The HTTP header is only 263 bytes, and the rest is FLV data.
The buffer has been filled.
At this point, the buffer and P are at the same position, which means the buffer has not been consumed and is directly filled with data until it is full. The characteristic of FastBuffer is that it can only hold 128KB, and if it becomes full, it will assert an error.
The Buffer will only be reallocated when set_buffer is called. Therefore, when the buffer is filled, it should return an error instead of asserting directly.
|
The problem lies in using assert directly when moving memory, while the if statement is only evaluated later. Therefore, memory should only be moved if it is possible to do so. If there is not enough space, the memory can be directly not moved, and it will fail later when checking for insufficient space.
|
The text was updated successfully, but these errors were encountered: