fix undefined behaviour due to a reference to a destroyed temporary object
This commit is contained in:
parent
89eda45df2
commit
e3b7e6abd6
|
|
@ -123,7 +123,8 @@ uint64_t ConnectionImpl::parse(const Buffer &buffer)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// try to recognize the frame
|
// try to recognize the frame
|
||||||
ReceivedFrame receivedFrame(ReducedBuffer(buffer, processed), _maxFrame);
|
ReducedBuffer reduced_buf(buffer, processed);
|
||||||
|
ReceivedFrame receivedFrame(reduced_buf, _maxFrame);
|
||||||
|
|
||||||
// do we have the full frame?
|
// do we have the full frame?
|
||||||
if (receivedFrame.complete())
|
if (receivedFrame.complete())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue