Assert that packet is inside the buffer
The buffer containing the response should contain only complete packets.
This commit is contained in:
parent
a51e094cd5
commit
873ea92915
@ -293,6 +293,7 @@ void RWBackend::process_packets(GWBUF* result)
|
||||
len |= (*it++) << 16;
|
||||
++it; // Skip the sequence
|
||||
mxb_assert(it != buffer.end());
|
||||
mxb_assert(std::distance(it, buffer.end()) >= len);
|
||||
auto end = it;
|
||||
end.advance(len);
|
||||
uint8_t cmd = *it;
|
||||
|
Loading…
x
Reference in New Issue
Block a user