usdot-fhwa-OPS / V2X-Hub

V2X Hub is a message handler that acts as a translator and data aggregator/disseminator for infrastructure components of a connected vehicle deployment.
Apache License 2.0
123 stars 69 forks source link

MAP Plugin crashes with segmentation fault #608

Closed jwillmartin closed 5 months ago

jwillmartin commented 7 months ago

Summary

The MAP plugin crashes when a MAP message is opened to be read. This only happens when a MAP message contains a newline character.

Most text editors automatically add a newline character at the end of files for human readability. But this causes an issue in the case of the plugin reading all contents.

Version

4.3.0 (Current)

Expected Behavior

The MAP plugin is able to read a file and decode, then encode the contents into a MAP message.

Actual Behavior

MAP plugin reads file and crashes is file contains a newline.

Steps to Reproduce the Actual Behavior

  1. Disable MAP Plugin
  2. Change configuration to open a file with MapData contents
  3. Add a newline character to the end of the file
  4. Enable MAP plugin

Related Work

No response