Skip to content

Undefined behavior in writeSerialPort() caused by developer error #20

@iJetColor

Description

@iJetColor

In the Sending Data section of the README, DATA_LENGTH is defined as 255, but the string that is actually passed to writeSerialPort() has a length of 12 characters. If 255 is, indeed, passed as DATA_LENGTH, undefined behavior may occur and can manifest itself as incomplete strings, and some may even be created automatically rather than explicitly defined by the developer.

I propose that writeSerialPort() should find the length of the *buffer string parameter instead of relying on developer input in order to prevent this issue from occurring in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions