wwbmmm opened a new pull request, #3452:
URL: https://github.com/apache/brpc/pull/3452
### What problem does this PR solve?
Issue Number: null
Problem Summary:
An RTMP Abort control message that references the chunk stream carrying
the message itself made the parser free that chunk stream while it was
still being processed. `RtmpChunkStream::Feed()` continues to access the
freed chunk stream right after `OnMessage()` returns, which may crash the
server or corrupt memory.
### What is changed and the side effects?
Changed:
- `RtmpChunkStream::OnAbortMessage` now skips `ClearChunkStream` when the
abort targets the chunk stream that is currently being parsed.
- Added a unit test that feeds a self-referencing Abort message and
verifies the chunk stream survives.
Side effects:
- Performance effects: None.
- Breaking backward compatibility: None.
---
### Check List:
- Please make sure your changes are compilable.
- When providing us with a new feature, it is best to add related tests.
- Please follow [Contributor Covenant Code of
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]