Skip to content

[Foxy] rclpy.serialization.deserialize_message crashes for invalid data #923

@suurjaak

Description

@suurjaak

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • ros-foxy-rclpy 1.0.8-1focal.20220209.144341 (latest available)
  • Client library (if applicable):
    • rclpy

Steps to reproduce issue

import rclpy.serialization, std_msgs.msg
rclpy.serialization.deserialize_message(b"", std_msgs.msg.String)

Expected behavior

Exception is raised.

Actual behavior

Process is killed, with

terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException'
  what():  Not enough memory in the buffer stream
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions