Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Event Serialization code should handle NULL strings correctly #591

@mrjerryjohns

Description

@mrjerryjohns

For WDM events, the expectation on applications that emit them is to memset them to 0 before using them. This protects the application against additions made to those events being made in schema before they may have had a chance to update their code (or they may not even care to set that field).

For fields of type string, the serialization utils in Weave do not correctly handle a NULL pointer and blit out an empty string for that field in the payload. This has caused crashes in application code.

In keeping with the theme that 'memset' is the right way to initialize an event, then this should follow suit as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions