Skip to content

Double speed request parsing does not take effect #97

@DZG-NB

Description

@DZG-NB

void RtspConnection::HandleRtcp(BufferReader& buffer)
{
char* peek = buffer.Peek();
if (peek[0] == '$' && buffer.ReadableBytes() > 4)
{
uint32_t pkt_size = peek[2] << 8 | peek[3];
if (pkt_size + 4 >= buffer.ReadableBytes())
{
buffer.Retrieve(pkt_size + 4);
}
}
}

If there are double speed requests and other data in the buffer, may the original logic skip these data due to the condition not being met, resulting in parsing failure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions