Skip to content

Binary data truncated when sending to AGWPE client #367

Closed
@mfncooper

Description

@mfncooper

In the server_send_monitored() function in server.c, binary data is being truncated and incompletely sent to the AGWPE client. The bug is caused by the use of strlcat() to copy the data on this line:

https://github.com/wb2osz/direwolf/blob/master/src/server.c#L925

Since NET/ROM data is binary, and frequently contains a null byte (e.g. as a sequence number), an AGWPE client does not receive the complete NET/ROM data, and cannot process it as such.

Also, I believe it is incorrect for Direwolf to be appending a '\r' to the end of the data here (on the next line, line 926). For binary data, it is certainly not appropriate, and for text data, it is very likely introducing inappropriate line ends where text is broken up across packets. The body of the I frame should contain only the binary data from the original AX.25 packet.

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