Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21785] Fix encoding/decoding when inner structure has different extensibility #237

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refs #21782. Fix in CdrSizeCalculator
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Oct 1, 2024
commit 6b8ba1753f47c216ed234fe056f511d944335293
4 changes: 3 additions & 1 deletion include/fastcdr/CdrSizeCalculator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,9 @@ class CdrSizeCalculator
0 < calculated_size)
{

if (8 < calculated_size)
if (8 < calculated_size ||
(1 != calculated_size && 2 != calculated_size && 4 != calculated_size &&
8 != calculated_size))
{
extra_size = 8; // Long EMHEADER.
if (NO_SERIALIZED_MEMBER_SIZE != serialized_member_size_)
Expand Down