Skip to content
Snippets Groups Projects
Commit 3fb69c15 authored by Kirill Shcherbatov's avatar Kirill Shcherbatov Committed by Vladimir Davydov
Browse files

iproto: fix assertion failure on invalid msgpack

Before the commit d9f82b17 "More than one row in fixheader.
Zstd compression", xrow_header_decode treated everything until
'end' as the packet body while currently it allows a packet to
end before 'end'. The iproto_msg_decode may receive an invalid
msgpack but it still assumes that xrow_header_decode sets an
error in such case and use assert to test it, bit it is not so.
Introduced a new boolean flag to control routine behaviour. When
flag is set, xrow_header_decode should raise 'packet body' error
unless the packet ends exactly at 'end'.

@locker: renamed ensure_package_read to end_is_exact; fixed comments.

Closes #3900
parent 6666db8d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment